home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 216_02 / zmodem.doc < prev    next >
Text File  |  1980-01-01  |  103KB  |  2,905 lines

  1.  
  2.  
  3.  
  4.      The ZMODEM    Asynchronous Inter Application File Transfer Protocol
  5.  
  6.                   Chuck Forsberg
  7.  
  8.                Omen    Technology Inc
  9.  
  10.  
  11.                   Chuck Forsberg
  12.                Omen    Technology Inc
  13.            17505-V Northwest Sauvie Island Road
  14.               Portland Oregon 97231
  15.                Voice: 503-621-3406
  16.         Modem (TeleGodzilla): 503-621-3746 Speed 1200,300
  17.               Compuserve: 70007,2304
  18.             UUCP: ...!tektronix!reed!omen!caf
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. Chapter    0          Rev 12-19-86 Typeset 12-19-86             1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Chapter    0          Rev 12-19-86 Typeset 12-19-86             2
  71.  
  72.  
  73.  
  74. 1.  IIIINNNNTTTTEEEENNNNDDDDEEEEDDDD AAAAUUUUDDDDIIIIEEEENNNNCCCCEEEE
  75.  
  76. This document is intended for telecommunications managers, systems
  77. programmers, and others    who choose and implement asynchronous file
  78. transfer protocols over    dial-up    networks and related environments.
  79.  
  80.  
  81. 2.  EEEEVVVVOOOOLLLLUUUUTTTTIIIIOOOONNNN OOOOFFFF ZZZZMMMMOOOODDDDEEEEMMMM
  82.  
  83. In early 1986, Telenet funded a    project    to develop an improved public
  84. domain application to application file transfer    protocol.  This    protocol
  85. would alleviate    the throughput problems    network    customers were
  86. experiencing with XMODEM and Kermit file transfers.
  87.  
  88. In the beginning, we thought a few modifications to XMODEM would allow
  89. high performance over packet switched networks while preserving    XMODEM's
  90. simplicity.
  91.  
  92. The initial concept would add a    block number to    the ACK    and NAK    characters
  93. used by    XMODEM.     The resultant protocol    would allow the    sender to send
  94. more than one block before waiting for a response.
  95.  
  96. But how    to add the block number    to XMODEM's ACK    and NAK?  Pure binary[1]
  97. was out    because    some binary code combinations won't pass bidirectionally
  98. through    networks and operating systems.     Other operating systems may not
  99. be able    to recognize something coming back unless a break signal or a
  100. system dependent code or sequence is present.[2] By the    time all this and
  101. other fundamental problems were    corrected, XMODEM's simple ACK and NACK
  102. characters had evolved into a real packet.
  103.  
  104. Managing the window[3] was another problem.  Experience    gained in
  105. debugging The Source's SuperKermit protocol indicated a    window size of
  106. about 1000 characters was needed at 1200 bps.  This extrapolates to the
  107. better part of 20000 characters    at 19.2    kbps.  Much of the SuperKermit's
  108. complexity and debugging time centered around its ring buffering and
  109. window management.  There had to be an easier way to get the job done.
  110.  
  111. A sore point in    XMODEM and YMODEM is error recovery.  More to the point,
  112. how can    the receiver determine whether the sender has responded, or is
  113. ready to respond, to a retransmission request?    XMODEM attacks the problem
  114. by throwing away characters until a certain period of silence.    Too short
  115.  
  116.  
  117. __________
  118.  
  119.  1. used by WXMODEM protocol
  120.  
  121.  2. Without stopping for a response
  122.  
  123.  3. The    WINDOW is the data in transit between sender and receiver.
  124.  
  125.  
  126.  
  127.  
  128. Chapter    2          Rev 12-19-86 Typeset 12-19-86             2
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. Chapter    2          Rev 12-19-86 Typeset 12-19-86             3
  137.  
  138.  
  139.  
  140. a time allows a    spurious pause in output (network or timesharing
  141. congestion) to pass as error recovery.    Too long a timeout devastates
  142. throughput, and    allows a noisy line to lock up the protocol.  SuperKermit
  143. solves the problem with    a distinct start of packet that    does not appear
  144. anywhere else.    WXMODEM    and ZMODEM use character sequences to delineate
  145. the start of frames.
  146.  
  147. A further error    recovery problem arises    in streaming protocols.     How does
  148. the receiver know when (or if) the sender has recognized its error signal?
  149. Is the next packet the correct response    to the error signal?  Is it
  150. something left over "in    the queue"?  Or    is this    new subpacket one of many
  151. that will have to be discarded bacause the sender did not receive the
  152. error signal?  How long    should this continue before sending another error
  153. signal?     How can the protocol prevent this from    degenerating into an
  154. argument about mixed signals?
  155.  
  156. SuperKermit uses selective retransmission, so it can accept any    good
  157. packet it receives.  Each time the SuperKermit receiver    gets a data
  158. packet,    it must    decide which outstanding packet    (if any) it "wants most"
  159. to receive, and    asks for that one.  In practice, complex software "hacks"
  160. are needed to attain acceptable    robustness.
  161.  
  162. For ZMODEM, we decided to forgo    the complexity of SuperKermit's    selective
  163. retransmission scheme and its associated buffer    management logic and
  164. memory requirements.
  165.  
  166. Another    sore point with    XMODEM and WXMODEM is the garbage added    to files.
  167. This was accpetable with old CP/M files    which had no exact length, but not
  168. with modern systems such as DOS    and Unix.  YMODEM uses file length
  169. information transmitted    in the header block to trim the    output file, but
  170. this causes data loss when transferring    files that grow    during a transfer.
  171. In some    cases, the file    length may be unknown, as when data is obtained
  172. from a process.     Variable length data subpackets solve both of these
  173. problems.
  174.  
  175. Since some characters had to be    escaped    anyway,    there wasn't any point
  176. wasting    bytes to fill out a fixed packet length    or to specify a    variable
  177. packet length.    In ZMODEM, the length of data subpackets is denoted by
  178. ending each subpacket with an escape sequence analagous    to BISYNC and
  179. HDLC.
  180.  
  181. The end    result was a ZMOEM header containing a "frame type", four bytes    of
  182. supervisory information, and its own CRC-16.  Data frames consist of a
  183. header followed    by 1 or    more data subpackets.  In the absence of
  184. transmission errors, an    entire file can    be sent    in one data frame.
  185.  
  186. Since the sending system may be    sensitive to numerous control characters
  187. or strip parity    in the reverse data path, all of the headers sent by the
  188. receiver are simply sent in hex.  A common lower level routine receives
  189. all headers, allowing the main program logic to    deal with headers and data
  190. subpackets as objects.
  191.  
  192.  
  193.  
  194. Chapter    2          Rev 12-19-86 Typeset 12-19-86             3
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. Chapter    2          Rev 12-19-86 Typeset 12-19-86             4
  203.  
  204.  
  205.  
  206. With equivalent    binary (efficient) and hex (network friendly) frames, the
  207. sending    program    can send an "invitation    to receive" sequence to    activate
  208. the receiver without undue concern of crashing the remote application with
  209. unexpected  control characters.
  210.  
  211. Going "back to scratch"    in the protocol    design presents    an oppurtunity to
  212. steal good ideas from many sources and to add a    few new    ones.
  213.  
  214. From Kermit and    UUCP comes the concept of an initial dialog to exchange
  215. system parameters.
  216.  
  217. ZMODEM generalizes Compuserve B    Protocol's host    controlled transfers to
  218. single command AutoDownload and    command    downloading.  A    Security Challenge
  219. discourages password hackers and Trojan    Horse authors from abusing
  220. ZMODEM's power.
  221.  
  222. We were    also keen to the pain and $uffering of legions of
  223. telecommunicators whose    file transfers have been ruined    by communications
  224. and timesharing    faults.     ZMODEM's file transfer    recovery and advanced file
  225. management are dedicated to these kindred comrades.
  226.  
  227. After ZMODEM had been operational a short time,    Earl Hall pointed out the
  228. obvious: ZMODEM's user friendly    AutoDownload was almost    useless    if the
  229. user must assign transfer options to each of the sending and receiving
  230. programs.  Now,    transfer options may be    specified to/by    the sending
  231. program, which passes them to the receiving program in the ZFILE header.
  232.  
  233.  
  234.  
  235. 3.  AAAACCCCKKKKNNNNOOOOWWWWLLLLEEEEDDDDGGGGMMMMEEEENNNNTTTTSSSS
  236.  
  237. Encouragement and suggestions by Thomas    Buck, Ward Christensen,    Earl Hall,
  238. Irv Hoff, Stuart Mathison, and John Wales, are gratefully acknowledged.
  239.  
  240.  
  241. 4.  RRRREEEELLLLAAAATTTTEEEEDDDD DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTSSSS
  242.  
  243. The following files may    be useful while    studying this document:
  244.  
  245. YYYYMMMMOOOODDDDEEEEMMMM....DDDDOOOOCCCC Describes the XMODEM    and YMODEM file    transfer protocols
  246.  
  247. zzzzmmmmooooddddeeeemmmm....hhhh Provides definitions for the manifest constants referenced
  248.     herein.
  249.  
  250. rrrrzzzz....cccc,,,, sssszzzz....cccc,,,, rrrrbbbbssssbbbb....cccc Unix    source code for    operating ZMODEM programs.
  251.  
  252. rrrrzzzz....1111,,,, sssszzzz....1111 Manual pages    for rz and sz (Troff sources).
  253.  
  254. zzzzmmmm....cccc    Operating system independent low level ZMODEM subroutines.
  255.  
  256.  
  257.  
  258.  
  259.  
  260. Chapter    4          Rev 12-19-86 Typeset 12-19-86             4
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. Chapter    5          Rev 12-19-86 Typeset 12-19-86             5
  269.  
  270.  
  271.  
  272. 5.  RRRROOOOSSSSEEEETTTTTTTTAAAA SSSSTTTTOOOONNNNEEEE
  273.  
  274. Here are some definitions which    reflect    current    vernacular in the computer
  275. media.    The attempt here is identify the file transfer protocol    rather
  276. than specific programs.
  277.  
  278. Frame    A ZMODEM frame consists    of a header and    0 or more data subpackets.
  279.  
  280. XMODEM    refers to the original 1979 file transfer etiquette introduced by
  281.     Ward Christensen's 1979    MODEM2 program.     It's also called the
  282.     MODEM or MODEM2    protocol.  Some    who are    unaware    of MODEM7's
  283.     unusual    batch file mode    call it    MODEM7.     Other aliases include
  284.     "CP/M Users's Group" and "TERM II FTP 3".  This    protocol is
  285.     supported by most communications programs because it is    easy to
  286.     implement.
  287.  
  288. XMODEM/CRC replaces XMODEM's 1 byte checksum with a two    byte Cyclical
  289.     Redundancy Check (CRC-16), improving error detection.
  290.  
  291. YMODEM    refers to the XMODEM/CRC protocol with the throughput and/or batch
  292.     transmission enhancements described in YMODEM.DOC.
  293.  
  294.  
  295. 6.  WWWWHHHHYYYY    DDDDEEEEVVVVEEEELLLLOOOOPPPP    ZZZZMMMMOOOODDDDEEEEMMMM????
  296.  
  297. Since its development half a decade ago, the Ward Christensen MMMMOOOODDDDEEEEMMMM
  298. protocol has enabled a wide variety of computer    systems    to interchange
  299. data.  There is    hardly a communications    program    that doesn't at    least
  300. claim to support this protocol,    now called XXXXMMMMOOOODDDDEEEEMMMM.
  301.  
  302. Advances in computing, modems and networking have spread the XMODEM
  303. protocol far beyond the    micro to micro environment for which it    was
  304. designed.  These application have exposed some weaknesses:
  305.  
  306.    o+ The user interface    is suitable for    computer hobbyists.  Multiple
  307.      commands must be keyboarded to transfer each file.
  308.  
  309.    o+ Since commands must be given to both programs, simple menu    selections
  310.      are not possible.
  311.  
  312.    o+ The short block length causes throughput to suffer    when used with
  313.      timesharing systems, packet switched networks, satellite circuits,
  314.      and buffered (error correcting) modems.
  315.  
  316.    o+ The 8 bit checksum    and unprotected    transactions allow undetected
  317.      errors and    disrupted file transfers.
  318.  
  319.    o+ Only one file can be sent per command.  The file name has to be given
  320.      twice, first to the sending program and then again    to the receiving
  321.      program.
  322.  
  323.  
  324.  
  325.  
  326. Chapter    6          Rev 12-19-86 Typeset 12-19-86             5
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. Chapter    6          Rev 12-19-86 Typeset 12-19-86             6
  335.  
  336.  
  337.  
  338.    o+ The transmitted file accumulates as many as 127 bytes of garbage.
  339.  
  340.    o+ The modification date and other file attributes are lost.
  341.  
  342.    o+ XMODEM requires _c_o_m_p_l_e_t_e 8    bit transparency, all 256 codes.  XMODEM
  343.      will not operate over some    networks that use ASCII    flow control or
  344.      escape codes.  Setting pure transparency often disables important
  345.      network control functions for the duration    of the call.
  346.  
  347. A number of other protocols have been developed    over the years,    but none
  348. have displaced XMODEM to date.
  349.  
  350.    o+ Lack of public domain documentation and example programs have kept
  351.      proprietary protocols such    as MNP,    Blast, and others tightly bound    to
  352.      the fortunes of their suppliers.
  353.  
  354.    o+ Link level    protocols such as X.25,    X.PC, and MNP do not manage
  355.      application to application    file transfers.
  356.  
  357.    o+ The Kermit    protocol was developed to allow    file transfers in
  358.      environments hostile to XMODEM.  The performance compromises
  359.      necessary to accommodate traditional mainframe environments limit
  360.      Kermit's efficiency.  Even    with completely    transparent channels,
  361.      Kermit control character quoting limits the efficiency of binary file
  362.      transfers to about    75 per cent.[1]
  363.  
  364.      Kermit Sliding Windows ("SuperKermit") improves throughput    over
  365.      networks at the cost of increased complexity.  SuperKermit    state
  366.      transitions are encoded in    a special language "wart" which    requires a
  367.      C compiler.  The SuperKermit C code requires full duplex
  368.      communications and    the ability to check for the presence of
  369.      characters    in the input queue, precluding its implementation on some
  370.      operating systems.
  371.  
  372.      A number of submodes are used in various Kermit programs, including
  373.      different methods of transferring binary files.  Two Kermit programs
  374.      will mysteriously fail to operate with each other if the user has not
  375.      correctly specified these submodes.
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385. __________
  386.  
  387.  1. Some Kermit    programs support run length encoding.
  388.  
  389.  
  390.  
  391.  
  392. Chapter    6          Rev 12-19-86 Typeset 12-19-86             6
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. Chapter    6          Rev 12-19-86 Typeset 12-19-86             7
  401.  
  402.  
  403.  
  404. A number of extensions to the XMODEM protocol have been    made.
  405.  
  406.  o+ XMODEM-k uses 1024 byte blocks to reduce the    overhead from transmission
  407.    delays by 87    per cent compared to XMODEM, but network delays    can still
  408.    degrade performance.     Some networks may not be able to transmit 1024
  409.    byte    packets.
  410.  
  411.  o+ The handling    of files that are not a    multiple of 1024 or 128    bytes is
  412.    awkward, especially if the file length is not known,    or changes during
  413.    transmission.
  414.  
  415.  o+ YYYYMMMMOOOODDDDEEEEMMMM----gggg provides efficient batch file transfers, preserving    exact file
  416.    length and file modification    date.  YYYYMMMMOOOODDDDEEEEMMMM----gggg    is essentially insensitive
  417.    to network delays.  Because it does not support error recovery,
  418.    YMODEM-g is usually used hardwired or with a    reliable link level
  419.    protocol.  IF YMODEM-g detects a CRC    error, data transfers are aborted.
  420.    YMODEM-g is easy to implement because it closely resembles XMODEM-CRC.
  421.  
  422. Another    XMODEM "extension" is protocol cheating, referred to as    "Turbo
  423. Download" and OOOOvvvveeeerrrrTTTThhhhrrrruuuusssstttteeeerrrr[2].    These sometimes    improve    XMODEM throughput
  424. by disabling error recovery.
  425.  
  426. The ZMODEM Protocol corrects the weaknesses described above while
  427. maintaining as much of XMODEM/CRC's simplicity and prior art as    possible.
  428.  
  429.  
  430.  
  431. 7.  ZZZZMMMMOOOODDDDEEEEMMMM PPPPrrrroooottttooooccccoooollll DDDDeeeessssiiiiggggnnnn CCCCrrrriiiitttteeeerrrriiiiaaaa
  432.  
  433. The design of a    file transfer protocol is an engineering compromise
  434. between    conflicting requirements:
  435.  
  436. 7.1  EEEEaaaasssseeee ooooffff UUUUsssseeee
  437.  
  438.  o+ ZMODEM allows either    program    to initiate file transfers, passing
  439.    commands and/or modifiers to    the other program.
  440.  
  441.  o+ File    names need be entered only once.
  442.  
  443.  o+ Menu    selections are supported.
  444.  
  445.  o+ Wild    Card names may be used with batch transfers.
  446.  
  447.  o+ Minimum keystrokes required to initiate transfers.
  448.  
  449.  
  450.  
  451. __________
  452.  
  453.  2. Omen Technology Trademark
  454.  
  455.  
  456.  
  457.  
  458. Chapter    7          Rev 12-19-86 Typeset 12-19-86             7
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. Chapter    7          Rev 12-19-86 Typeset 12-19-86             8
  467.  
  468.  
  469.  
  470.  o+ ZRQINIT frame sent by sending program can trigger automatic downloads.
  471.  
  472.  o+ ZMODEM can step down    to X/YMODEM if the other end does not support
  473.    ZMODEM.[1]
  474.  
  475. 7.2  TTTThhhhrrrroooouuuugggghhhhppppuuuutttt
  476.  
  477. ZMODEM is designed for optimum performance with    almost no degradation
  478. caused by delays introduced by packet switched networks    and timesharing
  479. systems.
  480.  
  481. ZMODEM is optimized for    best throughput    over networks where line hits
  482. occur infrequently.  This assumption markedly reduces code complexity and
  483. memory requirements.  ZMODEM protocol features enhance rapid error
  484. recovery compared to network compatible    XMODEM implementations.
  485.  
  486. In the absence of network delays, error    recovery is rapid, much    faster
  487. than YMODEM or network compatible versions of XMODEM.
  488.  
  489. Many transfers will originate from a timesharing system    connected to a
  490. packet switched    network.  ZMODEM features allow    simple,    efficient
  491. implementation on a wide variety of timesharing    hosts.
  492.  
  493. File transfers begin immediately regardless of which program is    started
  494. first, without the 10 second delay associated with XMODEM.
  495.  
  496.  
  497. 7.3  IIIInnnntttteeeeggggrrrriiiittttyyyy aaaannnndddd RRRRoooobbbbuuuussssttttnnnneeeessssssss
  498.  
  499. Once a ZMODEM session is begun,    all transactions are protected with 16 bit
  500. CRC.[2]    Complex    proprietary techniques such as CCCCyyyybbbbeeeerrrrnnnneeeettttiiiicccc DDDDaaaattttaaaa
  501. RRRReeeeccccoooovvvveeeerrrryyyy((((TTTTMMMM))))[3]    are not    needed for reliable transfers.
  502.  
  503. A security challenge mechanism guards against "Trojan Horse" messages.
  504.  
  505. 7.4  EEEEaaaasssseeee ooooffff IIIImmmmpppplllleeeemmmmeeeennnnttttaaaattttiiiioooonnnn
  506.  
  507. ZMODEM accommodates a wide variety of systems:
  508.  
  509.  o+ Microcomputers that cannot overlap disk and serial i/o
  510.  
  511.  
  512.  
  513. __________
  514.  
  515.  1. Provided the transmission medium accommodates X/YMODEM.
  516.  
  517.  2. Except for the CAN-CAN-CAN-CAN-CAN abort sequence.
  518.  
  519.  3. Unique to Professional-YAM and PowerCom
  520.  
  521.  
  522.  
  523.  
  524. Chapter    7          Rev 12-19-86 Typeset 12-19-86             8
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. Chapter    7          Rev 12-19-86 Typeset 12-19-86             9
  533.  
  534.  
  535.  
  536.  o+ Microcomputers that cannot overlap serial send and receive
  537.  
  538.  o+ Computers and/or networks requiring XON/XOFF    flow control
  539.  
  540.  o+ Computers that cannot check the serial input    queue for the presence of
  541.    data    without    having to wait for the data to arrive.
  542.  
  543. Although ZMODEM    provides "hooks" for multiple "threads", ZMODEM    is not
  544. intended to replace link level protocols such as X.25.
  545.  
  546. ZMODEM accommodates network and    timesharing system delays by continuously
  547. transmitting data unless the receiver interrupts the sender to request
  548. retransmission of garbled data.     ZMODEM    in effect uses the entire file as
  549. a window.[4]
  550.  
  551. ZMODEM provides    a general purpose application to application file transfer
  552. protocol which may be used directly or with with reliable link level
  553. protocols such as X.25,    MNP, Fastlink, etc.  When used with X.25, MNP,
  554. Fastlink, etc.,    ZMODEM detects and corrects errors in the interfaces
  555. between    error controlled media and the remainder of the    communications
  556. link.
  557.  
  558.  
  559. 8.  ZZZZMMMMOOOODDDDEEEEMMMM RRRREEEEQQQQUUUUIIIIRRRREEEEMMMMEEEENNNNTTTTSSSS
  560.  
  561. ZMODEM requires    an 8 bit transfer medium.  ZMODEM escapes network control
  562. characters to allow operation with packet switched networks.  In general,
  563. ZMODEM operates    over any path that supports XMODEM, and    over some that
  564. don't.
  565.  
  566. To support full    streaming,[1] the transmisson path should either assert
  567. flow control or    pass full speed    transmission without loss of data.
  568.  
  569. 8.1  FFFFiiiilllleeee CCCCoooonnnntttteeeennnnttttssss
  570.  
  571. ZMODEM places no constraints on    the information    content    of binary files,
  572. except that the    number of bits in the file must    be a multiple of 8.
  573.  
  574. Since ZMODEM is    used to    transfer files between different types of computer
  575. systems, text files must meet minimum requirements if they are to be
  576. readable on a wide variety of systems and environments.
  577.  
  578. Text lines consist of printing ASCII characters, spaces, tabs, and
  579.  
  580.  
  581. __________
  582.  
  583.  4. Streaming strateges    are discussed in coming    chapters.
  584.  
  585.  1. With XOFF and XON, or out of band flow control such    as X.25    or CTS
  586.  
  587.  
  588.  
  589.  
  590. Chapter    8          Rev 12-19-86 Typeset 12-19-86             9
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. Chapter    8          Rev 12-19-86 Typeset 12-19-86            10
  599.  
  600.  
  601.  
  602. backspaces.
  603.  
  604. Overstruck characters may be generated by backspacing or by overprinting
  605. the line with CR (015) not followed by LF.
  606.  
  607. Overstruck characters generated    with backspaces    should be sent with the
  608. most important character last to accomodate CRT    displays that cannot
  609. overstrike.  A text line is terminated by a CR/LF (015,    012) sequence, or
  610. by a NL    (012) character.  The sending program may use the ZZZZCCCCNNNNLLLL bit to
  611. force the receiving program to convert the received end    of line    to its
  612. local end of line convention.
  613.  
  614. A CR (013) without a linefeed implies overprinting, and    is not acceptable
  615. as a logical line separator.  Overprinted lines    should print all important
  616. characters in the last pass to allow CRT displays to display meaningful
  617. text.
  618.  
  619. NNNN....BBBB....:::: Files that have been translated in such a    way as to modify their
  620. length cannot be updated with the ZZZZCCCCRRRREEEECCCCOOOOVVVV Conversion Option.  ZZZZCCCCRRRREEEECCCCOOOOVVVV
  621. allows interrupted transfers to    be resumed without loss    of data.
  622.  
  623.  
  624. 9.  ZZZZMMMMOOOODDDDEEEEMMMM BBBBAAAASSSSIIIICCCCSSSS
  625.  
  626. 9.1  PPPPaaaacccckkkkeeeettttiiiizzzzaaaattttiiiioooonnnn
  627.  
  628. ZMODEM frames differ somewhat from X/YMODEM blocks.  X/YMODEM blocks are
  629. not used for the following reasons:
  630.  
  631.  o+ Block numbers are limited to    256
  632.  
  633.  o+ No provision    for variable length blocks
  634.  
  635.  o+ Line    hits corrupt protocol signals, causing failed file transfers.  In
  636.    particular, modem errors sometimes generate false block numbers, false
  637.    EOTs    and false ACKs.     False ACKs are    the most troublesome as    they cause
  638.    the sender to lose synchronization with the receiver.
  639.  
  640.    State of the    art X/YMODEM programs such as Professional-YAM and
  641.    PowerCom overcome some of these weaknesses with clever proprietary
  642.    code, but a stronger    protocol is desired.
  643.  
  644.  o+ It is difficult to determine    the beginning and ends of X/YMODEM blocks
  645.    when    line hits cause    a loss of synchronization.  This precludes rapid
  646.    error recovery.
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656. Chapter    9          Rev 12-19-86 Typeset 12-19-86            10
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. Chapter    9          Rev 12-19-86 Typeset 12-19-86            11
  665.  
  666.  
  667.  
  668. 9.2  LLLLiiiinnnnkkkk EEEEssssccccaaaappppeeee EEEEnnnnccccooooddddiiiinnnngggg
  669.  
  670. ZMODEM achieves    data transparency by extending the 8 bit character set
  671. (256 codes) with escape    sequences based    on the ZMODEM data link    escape
  672. character ZDLE.[1]
  673.  
  674. Link Escape coding permits variable length data    subpackets without the
  675. overhead of a separate byte count.  It allows the beginning of frames to
  676. be detected without special timing techniques, facilitating rapid error
  677. recovery.
  678.  
  679. Link Escape coding does    add some overhead.  The    worst case, a file
  680. consisting entirely of escaped characters, would incur a 50% overhead.
  681.  
  682. The ZDLE character is special.    ZDLE represents    a control sequence of some
  683. sort.  If a ZDLE character appears in binary data, it is prefixed with
  684. ZDLE, then sent    as ZDLEE.
  685.  
  686. The value for ZDLE is octal 030    (ASCII CAN).  This particular value was
  687. chosen to allow    a string of CAN    characters to abort a ZMODEM session,
  688. compatible with    X/YMODEM session abort.
  689.  
  690. Since CAN is not used in normal    terminal operations, interactive
  691. applications and communications    programs can monitor the data flow for
  692. ZDLE.  The following characters    can be scanned to detect the ZRQINIT
  693. header,    the invitation to automatically    download commands or files.
  694.  
  695. Receipt    of five    successive CAN characters will abort a ZMODEM session.
  696. Eight CAN characters are sent.
  697.  
  698. The receiving program decodes any sequence of ZDLE followed by a byte with
  699. bit 6 set and bit 5 reset (upper case letter, either parity) to    the
  700. equivalent control character by    inverting bit 6.  This allows the
  701. transmitter to escape any control character that cannot    be sent    by the
  702. communications medium.    In addition, the receiver recognizes escapes for
  703. 0177 and 0377 should these characters need to be escaped.
  704.  
  705. By default, ZMODEM software currently escapes ZDLE, 020, 0220, 021, 0221,
  706. 023, and 0223.    If preceded by 0100 or 0300 (@), 015 and 0215 are also
  707. escaped    to protect the Telenet command escape CR-@-CR.
  708.  
  709. The ZMODEM routines in zm.c accept an option to    escape all control
  710. characters, to allow operation with less transparent networks.    The
  711. routines also accept an    option to escape only the ZDLE character, for
  712.  
  713.  
  714. __________
  715.  
  716.  1. This and other constants are defined in the    _z_m_o_d_e_m._h include file.
  717.     Please note    that constants with a leading 0    are octal constants in C.
  718.  
  719.  
  720.  
  721.  
  722. Chapter    9          Rev 12-19-86 Typeset 12-19-86            11
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Chapter    9          Rev 12-19-86 Typeset 12-19-86            12
  731.  
  732.  
  733.  
  734. highest    possible throughput.
  735.  
  736. 9.3  HHHHeeeeaaaaddddeeeerrrr
  737.  
  738. All ZMODEM frames begin    with a header which may    be sent    in binary or HEX
  739. form.  ZMODEM uses a single routine to recognize binary    and hex    headers.
  740. Either form of the header contains the same raw    information:
  741.  
  742.  o+ A type byte[2] [3]
  743.  
  744.  o+ Four    bytes of data indicating flags and/or numeric quantities depending
  745.    on the frame    type
  746.  
  747.            FFFFiiiigggguuuurrrreeee 1111....  Order of Bytes in    Header
  748.  
  749.            TYPE:  frame    type
  750.            F0: Flags least significant byte
  751.            P0: file Position least significant
  752.            P3: file Position most significant
  753.  
  754.                TYPE     F3 F2 F1 F0
  755.                -------------------
  756.                TYPE     P0 P1 P2 P3
  757.  
  758. 9.3.1  BBBBiiiinnnnaaaarrrryyyy HHHHeeeeaaaaddddeeeerrrr
  759. A binary header    is only    sent by    the sending program to the receiving
  760. program.
  761.  
  762. A binary header    begins with the    sequence ZPAD, ZDLE, ZBIN.
  763.  
  764. The frame type byte is ZDLE encoded.
  765.  
  766. The four position/flags    bytes are ZDLE encoded.
  767.  
  768. A two byte CRC of the frame type and position/flag bytes is ZDLE encoded.
  769.  
  770. 0 or more binary data subpackets will follow depending on the frame type.
  771.  
  772. The function _z_s_b_h_d_r transmits a    binary header.    The function _z_g_e_t_h_d_r
  773. receives a binary or hex header.
  774.  
  775.  
  776.  
  777. __________
  778.  
  779.  2. The    frame types are    cardinal numbers beginning with    0 to minimize
  780.     state transition table memory requirements.
  781.  
  782.  3. Future extensions to ZMODEM    may use    the high order bits of the type
  783.     byte to indicate thread selection.
  784.  
  785.  
  786.  
  787.  
  788. Chapter    9          Rev 12-19-86 Typeset 12-19-86            12
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. Chapter    9          Rev 12-19-86 Typeset 12-19-86            13
  797.  
  798.  
  799.  
  800.              FFFFiiiigggguuuurrrreeee    2222....  Binary Header
  801.         * ZDLE A TYPE F3/P0    F2/P1 F1/P2 F0/P3 CRC-1    CRC-2
  802.  
  803.  
  804. 9.3.2  HHHHEEEEXXXX HHHHeeeeaaaaddddeeeerrrr
  805. The receiver sends responses in    hex headers.  The sender also uses hex
  806. headers    when they are not followed by binary data subpackets.
  807.  
  808. Hex encoding accomodates XON/XOFF flow control.     The hex header    receiving
  809. routine    ignores    flow control characters.
  810.  
  811. Use of Kermit style encoding for control and paritied characters was
  812. considered and rejected    because    of increased possibility of interacting
  813. with some timesharing systems's    line edit functions.  Use of HEX headers
  814. from the receiving program allows control characters to    be used    to
  815. interrupt the sender when errors are detected.    Except for header types
  816. that imply data    subpackets to follow, a    HEX header may be used in place    of
  817. a binary header    wherever convenient.
  818.  
  819. A hex header begins with the sequence ZPAD, ZPAD, ZDLE,    ZHEX.  The _z_g_e_t_h_d_r
  820. routine    synchronizes with the ZPAD-ZDLE    sequence.  The extra ZPAD allows
  821. other parts of the program to detect a ZMODEM header and then call _z_g_e_t_h_d_r
  822. to receive the header.
  823.  
  824. The type byte, the four    position/flag bytes, and the CRC thereof are sent
  825. in hex using the character set 01234567890abcdef.  Upper case hex digits
  826. are not    allowed; they false trigger X/YMODEM programs.
  827.  
  828. A carriage return, line    feed, and XON[4] are appended to the HEX header
  829. but are    not strictly a part of it.  The    CR/LF aids debugging from
  830. printouts.  The    XON releases the sender    from spurious XOFF flow    control
  831. characters generated by    line noise, a common occurrence.
  832.  
  833. 0 or more ASCII    Encoded    data subpackets    will follow depending on the frame
  834. type.
  835.  
  836. The function _z_s_h_h_d_r sends a hex    header.
  837.  
  838.               FFFFiiiigggguuuurrrreeee 3333....  HEX Header
  839.  
  840.       *    * ZDLE B TYPE F3/P0 F2/P1 F1/P2    F0/P3 CRC-1 CRC-2 CR LF    XON
  841.  
  842. (TYPE, F3...F0,    CRC-1, and CRC-2 are each sent as two hex digits.)
  843.  
  844.  
  845.  
  846.  
  847. __________
  848.  
  849.  4. XON    is not sent after a ZFIN header, to allow clean    session    cleanup.
  850.  
  851.  
  852.  
  853.  
  854. Chapter    9          Rev 12-19-86 Typeset 12-19-86            13
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. Chapter    9          Rev 12-19-86 Typeset 12-19-86            14
  863.  
  864.  
  865.  
  866. 9.4  BBBBiiiinnnnaaaarrrryyyy DDDDaaaattttaaaa SSSSuuuubbbbppppaaaacccckkkkeeeettttssss
  867.  
  868. Binary data subpackets immediately follow the associated binary    header
  869. packet.     A binary data packet contains 0 to 1024 bytes of data.
  870. Recommended length values are 256 bytes    below 4800 bps,    1024 above 4800
  871. bps or when the    data link is known to be relatively error free.     Except
  872. for the    last subpacket in a file,[5] lengths should be a power of two.
  873.  
  874. No padding is used with    binary data subpackets.     The data bytes    are ZDLE
  875. encoded    and transmitted.  A ZDLE and frameend are then sent, followed by
  876. two ZDLE encoded CRC bytes.  The CRC accumulates the data bytes    and
  877. frameend.
  878.  
  879. The function _z_s_d_a_t_a sends a data subpacket.  The function _z_r_d_a_t_a receives
  880. a data subpacket.
  881.  
  882. 9.5  AAAASSSSCCCCIIIIIIII EEEEnnnnccccooooddddeeeedddd DDDDaaaattttaaaa    SSSSuuuubbbbppppaaaacccckkkkeeeetttt
  883.  
  884. The format of ASCII Encoded data subpackets is not currently specified.
  885. These would be used for    server commands, or main transfers in 7    bit
  886. environments.
  887.  
  888.  
  889. 10.  PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL TTTTRRRRAAAANNNNSSSSAAAACCCCTTTTIIIIOOOONNNN OOOOVVVVEEEERRRRVVVVIIIIEEEEWWWW
  890.  
  891. As with    the XMODEM recommendation, ZMODEM timing is receiver driven.  The
  892. transmitter should not time out    at all,    except to abort    the program if no
  893. headers    are received for an extended period of time, say one minute.[1]
  894.  
  895.  
  896. 10.1  SSSSeeeessssssssiiiioooonnnn SSSSttttaaaarrrrttttuuuupppp
  897.  
  898. To start a ZMODEM file transfer    session, the sending program is    called
  899. with the names of the desired file(s) and option(s).
  900.  
  901. The sending program may    send the string    "rz\r" to invoke the receiving
  902. program    from a possible    command    mode.  The "rz"    followed by carriage
  903. return activates a ZMODEM receive program or command if    it were    not
  904. already    active.
  905.  
  906. The sender may then display a message intended for human consumption, such
  907. as a list of the files requested, etc.
  908.  
  909.  
  910.  
  911. __________
  912.  
  913.  5. Or file segment if a sparse    file is    being processed
  914.  
  915.  1. Special considerations apply when sending commands.
  916.  
  917.  
  918.  
  919.  
  920. Chapter    10          Rev 12-19-86 Typeset 12-19-86            14
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. Chapter    10          Rev 12-19-86 Typeset 12-19-86            15
  929.  
  930.  
  931.  
  932. Then the sender    may send a ZZZZRRRRQQQQIIIINNNNIIIITTTT header.  The    ZZZZRRRRQQQQIIIINNNNIIIITTTT    header causes a
  933. previously started receive program to send its ZZZZRRRRIIIINNNNIIIITTTT header without
  934. delay.
  935.  
  936. In an interactive or conversational mode, the receiving    application may
  937. monitor    the data stream    for ZDLE.  The following characters may    be scanned
  938. for BBBB00000000    indicating a ZRQINIT header, a command to download a command or
  939. data.
  940.  
  941. The sending program awaits a command from the receiving    program    to start
  942. file transfers.     If a "C", "G",    or NAK is received, an XMODEM or YMODEM
  943. file transfer is indicated, and    file transfer(s) use the X/YMODEM
  944. protocol.  Note: With ZMODEM and YMODEM    Batch, the sending program
  945. provides the file name,    but not    with XMODEM.
  946.  
  947. In case    of garbled data, the sending program can repeat    the invitation to
  948. receive    a number of times until    a session starts.
  949.  
  950. When the ZMODEM    receive    program    starts,    it immediately sends a ZZZZRRRRIIIINNNNIIIITTTT
  951. header to initiate ZMODEM file transfers, or a ZZZZCCCCHHHHAAAALLLLLLLLEEEENNNNGGGGEEEE header to verify
  952. the sending program.  The receive program resends its header at    _r_e_s_p_o_n_s_e
  953. _t_i_m_e (default 10 second) intervals for a suitable period of time (40
  954. seconds    total) before falling back to X/YMODEM protocol.
  955.  
  956. If the receiving program receives a ZZZZRRRRQQQQIIIINNNNIIIITTTT header, it resends the ZZZZRRRRIIIINNNNIIIITTTT
  957. header.     If the    sending    program    receives the ZZZZCCCCHHHHAAAALLLLLLLLEEEENNNNGGGGEEEE    header,    it places
  958. the data in ZP0...ZP3 in an answering ZZZZAAAACCCCKKKK header.
  959.  
  960. If the receiving program receives a ZZZZRRRRIIIINNNNIIIITTTT header, it is an echo
  961. indicating that    the sending program is not operational.
  962.  
  963. Eventually the sending program correctly receives the ZZZZRRRRIIIINNNNIIIITTTT header.
  964.  
  965. The sender may then send an optional ZZZZSSSSIIIINNNNIIIITTTT frame to define the    receiving
  966. program's AAAAttttttttnnnn sequence.  The receiver sends a ZZZZAAAACCCCKKKK header in response,
  967. optionally containing the serial number    of the receiving program, or 0.
  968.  
  969. 10.2  FFFFiiiilllleeee TTTTrrrraaaannnnssssmmmmiiiissssssssiiiioooonnnn
  970.  
  971. The sender then    sends a    ZZZZFFFFIIIILLLLEEEE header with ZMODEM Conversion, Management,
  972. and Transport options[2] followed by a ZCRCW data subpacket containing the
  973. file name, file    length,    modification date, and other information identical
  974. to that    used by    YMODEM Batch.
  975.  
  976. The receiver examines the file name, length, and date information provided
  977.  
  978.  
  979. __________
  980.  
  981.  2. See    below, under ZFILE header type.
  982.  
  983.  
  984.  
  985.  
  986. Chapter    10          Rev 12-19-86 Typeset 12-19-86            15
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. Chapter    10          Rev 12-19-86 Typeset 12-19-86            16
  995.  
  996.  
  997.  
  998. by the sender in the context of    the specified transfer options,    the
  999. current    state of its file system(s), and local security    requirements.  The
  1000. receiving program should insure    the pathname and options are compatible
  1001. with its operating environment and local security requirements.
  1002.  
  1003. The receiver may respond with a    ZZZZSSSSKKKKIIIIPPPP header, which makes the sender
  1004. proceed    to the next file (if any) in the batch.
  1005.  
  1006.        If the receiver has a file with the same    name and length,
  1007.        it may respond with a ZZZZCCCCRRRRCCCC header, which    requires the
  1008.        sender to perform a CRC on the file and transmit    the CRC    in
  1009.        a ZZZZCCCCRRRRCCCC header.  The receiver uses this information to
  1010.        determine whether to accept the file or skip it.     This
  1011.        sequence    is triggered by    the ZMCRC Management Option.[3]
  1012.  
  1013. A ZZZZRRRRPPPPOOOOSSSS    header from the    receiver initiates transmission    of the file data
  1014. starting at the    offset in the file specified in    the ZZZZRRRRPPPPOOOOSSSS header.
  1015. Normally the receiver specifies    the data transfer begin    begin at offset    0
  1016. in the file.
  1017.        The receiver may    start the transfer further down    in the
  1018.        file.  This allows a file transfer interrupted by a loss
  1019.        or carrier or system crash to be    completed on the next
  1020.        connection without requiring the    entire file to be
  1021.        retransmitted.[4] If downloading    a file from a timesharing
  1022.        system that becomes sluggish, the transfer can be
  1023.        interrupted and resumed later with no loss of data.
  1024.  
  1025. The sender sends a ZZZZDDDDAAAATTTTAAAA binary    header (with file position) followed by
  1026. one or more data subpackets.
  1027.  
  1028. The receiver compares the file position    in the ZZZZDDDDAAAATTTTAAAA header with the
  1029. number of characters successfully received to the file.     If they do not
  1030. agree, a ZZZZRRRRPPPPOOOOSSSS error response is generated to force the    sender to the
  1031. right position within the file.[5]
  1032.  
  1033. A data subpacket terminated by ZZZZCCCCRRRRCCCCGGGGOOOO and CRC does not elicit a    response
  1034. unless an error    is detected; more data subpacket(s) follow immediately.
  1035.  
  1036.  
  1037. __________
  1038.  
  1039.  3. The    type of    CRC has    not been determined yet.  The obvious choice of
  1040.     the    CRC-16 used to protect packets may not be optimum for detecting
  1041.     differences    between    long files.  The fact that the file lengths are
  1042.     identical may give some guidance to    the selection of CRC.
  1043.  
  1044.  4. This does not apply    to files that have been    translated.
  1045.  
  1046.  5. If the ZMSPARS option is used, the receiver    instead    seeks to the
  1047.     position given in the ZDATA    header.
  1048.  
  1049.  
  1050.  
  1051.  
  1052. Chapter    10          Rev 12-19-86 Typeset 12-19-86            16
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. Chapter    10          Rev 12-19-86 Typeset 12-19-86            17
  1061.  
  1062.  
  1063.  
  1064.        ZZZZCCCCRRRRCCCCQQQQ data subpackets expect a ZZZZAAAACCCCKKKK response with the
  1065.        receiver's file offset if no error, otherwise a ZZZZRRRRPPPPOOOOSSSS
  1066.        response    with the last good file    offset.     Another data
  1067.        subpacket continues immediately.     ZZZZCCCCRRRRCCCCQQQQ subpackets are
  1068.        not used    if the receiver    does not indicate FDX ability
  1069.        with the    CCCCAAAANNNNFFFFDDDDXXXX bit.
  1070.  
  1071. ZZZZCCCCRRRRCCCCWWWW data subpackets expect a response    before the next    frame is sent.
  1072. If the receiver    does not indicate overlapped I/O capability with the
  1073. CCCCAAAANNNNOOOOVVVVIIIIOOOO    bit, or    sets a buffer size, the    sender uses the    ZZZZCCCCRRRRCCCCWWWW to allow
  1074. the receiver to    write its buffer before    sending    more data.
  1075.  
  1076.        A zero length data frame    may be used as an idle
  1077.        subpacket to prevent the    receiver from timing out in
  1078.        case data is not    immediately available to the sender.
  1079.  
  1080. In the absence of fatal    error, the sender eventually encounters    end of
  1081. file.  If the end of file is encountered within    a frame, the frame is
  1082. closed with a ZZZZCCCCRRRRCCCCEEEE data subpacket which does not elicit a response
  1083. except in case of error.
  1084.  
  1085. The sender sends a ZZZZEEEEOOOOFFFF    header with the    file ending offset equal to
  1086. the number of characters in the    file.  The receiver compares this
  1087. number with the    number of characters received.    If the receiver    has
  1088. received all of    the file, it closes the    file.  If the file close was
  1089. satisfactory, the receiver responds with ZZZZRRRRIIIINNNNIIIITTTT.  If the receiver has
  1090. not received all the bytes of the file,    the receiver sends ZZZZRRRRPPPPOOOOSSSS with
  1091. the current file offset, forcing the sender to resend the missing
  1092. data.  (If the receiver    cannot properly    close the file,    a ZZZZFFFFEEEERRRRRRRR    header
  1093. is sent.)
  1094.  
  1095.        After all files are processed, any further protocol
  1096.        errors should not prevent the sending program from
  1097.        returning with a    success    status.
  1098.  
  1099.  
  1100. 10.3  SSSSeeeessssssssiiiioooonnnn CCCClllleeeeaaaannnnuuuupppp
  1101.  
  1102. The sender closes the session with a ZZZZFFFFIIIINNNN header.  The receiver
  1103. acknowledges this with its own ZZZZFFFFIIIINNNN header.
  1104.  
  1105. When the sender    receives the acknowledging header, it sends two
  1106. characters, "OO" (Over and Out)    and exits to the operating system or
  1107. application that invoked it.  The receiver waits briefly for the "O"
  1108. characters, then exits whether they were received or not.
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118. Chapter    10          Rev 12-19-86 Typeset 12-19-86            17
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. Chapter    10          Rev 12-19-86 Typeset 12-19-86            18
  1127.  
  1128.  
  1129.  
  1130. 10.4  SSSSeeeessssssssiiiioooonnnn CCCCaaaannnncccceeeellll SSSSeeeeqqqquuuueeeennnncccceeee
  1131.  
  1132. If the receiving program has been receiving data in streaming mode,
  1133. the AAAAttttttttnnnn sequence is executed to interrupt data    transmission.  The
  1134. Cancel sequence    of eight CAN characters[6] and ten backspace
  1135. characters is sent.
  1136.  
  1137.        static char canistr[] = {
  1138.     24,24,24,24,24,24,24,24,8,8,8,8,8,8,8,8,8,8,0
  1139.        };
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176. __________
  1177.  
  1178.  6. The    trailing backspace characters attempt to erase the effects of the
  1179.     CAN    characters if they are received    by a command interpreter.
  1180.  
  1181.  
  1182.  
  1183.  
  1184. Chapter    10          Rev 12-19-86 Typeset 12-19-86            18
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. Chapter    10          Rev 12-19-86 Typeset 12-19-86            19
  1193.  
  1194.  
  1195.  
  1196. 11.  SSSSTTTTRRRREEEEAAAAMMMMIIIINNNNGGGG TTTTEEEECCCCHHHHNNNNIIIIQQQQUUUUEEEESSSS //// EEEERRRRRRRROOOORRRR RRRREEEECCCCOOOOVVVVEEEERRRRYYYY
  1197.  
  1198. It is a    fact of    life that no single method of streaming    is applicable
  1199. to a majority of today's computing and telecommunications
  1200. environments.  ZMODEM provides several data streaming methods
  1201. selected according to the limitations of the sending environment,
  1202. receiving environment, and transmission    channel(s).
  1203.  
  1204.  
  1205. 11.1  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg wwwwiiiitttthhhh SSSSaaaammmmpppplllliiiinnnngggg
  1206.  
  1207. If the receiver    can overlap serial I/O with disk I/O, and if the
  1208. sender can sample the reverse channel for the presence of data
  1209. without    having to wait,    full streaming can be used with    no AAAAttttttttnnnn
  1210. sequence required.  The    sender begins data transmission    with a ZZZZDDDDAAAATTTTAAAA
  1211. header and continuous ZZZZCCCCRRRRCCCCGGGG data subpackets.  When the receiver
  1212. detects    an error, it executes the AAAAttttttttnnnn sequence    and then sends a
  1213. ZZZZRRRRPPPPOOOOSSSS header with the correct position within the file.
  1214.  
  1215. At the end of each transmitted data subpacket, the sender checks for
  1216. the presence of    an error header    from the receiver.  To do this,    the
  1217. sender samples the reverse data    stream for the presence    of either a
  1218. ZPAD or    CAN character.    Any other character is ignored.[1]
  1219.  
  1220. ZPAD indicates some sort of error header from the receiver.  A CAN
  1221. suggests the user is attempting    to "stop the bubble machine" by
  1222. keyboarding CAN    characters.  If    one of these characters    is seen, an
  1223. empty ZCRCE data subpacket is sent.  Normally, the receiver will have
  1224. sent an    ZRPOS or other error header, which will    force the sender to
  1225. resume transmission at a different address, or take other action.  In
  1226. the unlikely event the ZPAD or CAN character was spurious, the
  1227. receiver will time out and send    an error packet.[2]
  1228.  
  1229. Then the receiver's response header is read and    acted upon.[3] A
  1230. ZZZZRRRRPPPPOOOOSSSS header resets the    sender's file offset to    the correct position.
  1231. If a ZZZZAAAACCCCKKKK header with an adress    that disagrees with the    current
  1232. address, it is ignored,    and another header is expected.     A ZZZZFFFFIIIINNNN,
  1233. ZZZZAAAABBBBOOOORRRRTTTT,    or TTTTIIIIMMMMEEEEOOOOUUUUTTTT terminates the session; a ZZZZSSSSKKKKIIIIPPPP terminates the
  1234. processing of this file.
  1235.  
  1236.  
  1237. __________
  1238.  
  1239.  1. The    call to    rdchk()    in sssszzzz....cccc    performs this function.
  1240.  
  1241.  2. The    obvious    choice of ZCRCW    packet,    which would trigger an ZACK from
  1242.     the    receiver, is not used because multiple in transit frames could
  1243.     result if the channel has a    long propagation delay.
  1244.  
  1245.  3. The    call to    getinsync() in sssszzzz....cccc performs this function.
  1246.  
  1247.  
  1248.  
  1249.  
  1250. Chapter    11          Rev 12-19-86 Typeset 12-19-86            19
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. Chapter    11          Rev 12-19-86 Typeset 12-19-86            20
  1259.  
  1260.  
  1261.  
  1262. The reverse channel is then sampled for    the presence of    another
  1263. header from the    receiver.[4] if    one is detected, the getinsync()
  1264. function is again called to read another error header.    Otherwise,
  1265. transmission resumes at    the (possibly reset) file offset with a    ZZZZDDDDAAAATTTTAAAA
  1266. header followed    by data    subpackets.
  1267.  
  1268.  
  1269. 11.2  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg wwwwiiiitttthhhh RRRReeeevvvveeeerrrrsssseeee IIIInnnntttteeeerrrrrrrruuuupppptttt
  1270.  
  1271. The above method cannot    be used    if the reverse data stream cannot be
  1272. sampled    without    entering an I/O    wait.  An alternate method is to
  1273. instruct the receiver to interrupt the sending program when an error
  1274. is detected.
  1275.  
  1276. The receiver can interrupt the sender with a control character,    break
  1277. signal,    or combination thereof,    as specified in    the AAAAttttttttnnnn sequence.
  1278. After executing    the AAAAttttttttnnnn sequence, the receiver    sends a    hex ZZZZRRRRPPPPOOOOSSSS
  1279. header to force    the sender to resend the lost data.
  1280.  
  1281. When the sending program responds to this interrupt, it    reads a    HEX
  1282. header (normally ZRPOS)    from the receiver and takes the    action
  1283. described in the previous section.  The    Unix sssszzzz....cccc program uses a
  1284. setjmp/longjmp call to catch the interrupt generated by    the AAAAttttttttnnnn
  1285. sequence.  Catching the    interrupt activates the    getinsync() function
  1286. to read    the receiver's error header and    take appropriate action.
  1287.  
  1288. When compiled for standard SYSTEM III/V    Unix, sssszzzz....cccc uses    an AAAAttttttttnnnn
  1289. sequence of Ctrl-C followed by a 1 second pause    to interrupt the
  1290. sender,    then give the sender (Unix) time to prepare for    the
  1291. receiver's error header.
  1292.  
  1293.  
  1294. 11.3  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg wwwwiiiitttthhhh aaaa SSSSlllliiiiddddiiiinnnngggg WWWWiiiinnnnddddoooowwww
  1295.  
  1296. If none    of the above methods is    applicable, hope is not    yet lost.  If
  1297. the sender can buffer responses    from the receiver, the sender can use
  1298. ZCRCQ data subpackets to get ACKs from the receiver without
  1299. interrupting the transmission of data.    After a    sufficient number of
  1300. ZCRCQ data subpackets have been    sent, the sender can read one of the
  1301. headers    that should have arrived in its    receive    interrupt buffer.
  1302.  
  1303. A problem with this method is the possibility of wasting an excessive
  1304. amount of time responding to the receiver's error header.  It may be
  1305. possible to program the    reciever's AAAAttttttttnnnn    sequence to flush the
  1306. sender's interrupt buffer before sending the ZRPOS header.
  1307.  
  1308.  
  1309. __________
  1310.  
  1311.  4. If sampling    is possible.
  1312.  
  1313.  
  1314.  
  1315.  
  1316. Chapter    11          Rev 12-19-86 Typeset 12-19-86            20
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. Chapter    11          Rev 12-19-86 Typeset 12-19-86            21
  1325.  
  1326.  
  1327.  
  1328. 11.4  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg oooovvvveeeerrrr EEEErrrrrrrroooorrrr    FFFFrrrreeeeeeee CCCChhhhaaaannnnnnnneeeellllssss
  1329.  
  1330. File transfer protocols    predicated on the existence of an error    free
  1331. end to end communications channel have been proposed from time to
  1332. time.  Such channels have proven to be more readily available in
  1333. theory than in actuality.
  1334.  
  1335. A ZMODEM sender    assuming an error free channel with end    to end flow
  1336. control    can send the entire file in one    frame without any checking of
  1337. the reverse stream.  If    this channel is    completely transparent,    only
  1338. ZDLE need be escaped.  The resulting protocol overhead for average
  1339. long files is less than    one per    cent.[5]
  1340.  
  1341. 11.5  SSSSeeeeggggmmmmeeeennnntttteeeedddd    SSSSttttrrrreeeeaaaammmmiiiinnnngggg
  1342.  
  1343. If the receiver    cannot overlap serial and disk I/O, it uses the
  1344. ZZZZRRRRIIIINNNNIIIITTTT frame to    specify    a buffer length    which the sender will not
  1345. overflow.  The sending program sends a ZZZZCCCCRRRRCCCCWWWW data subpacket and    waits
  1346. for a ZZZZAAAACCCCKKKK header before sending the next segment of the file.
  1347.  
  1348. If the sending program supports    reverse    data stream sampling or
  1349. interrupt, error recovery will be faster (on average) than a protocol
  1350. (such as YMODEM) that sends large blocks.
  1351.  
  1352. A sufficiently large receiving buffer allows throughput    to closely
  1353. approach that of full streaming.  For example, 16kb segmented
  1354. streaming adds about 3 per cent    to full    streaming ZMODEM file
  1355. transfer times when the    round trip delay is five seconds.
  1356.  
  1357.  
  1358. 12.  AAAATTTTTTTTEEEENNNNTTTTIIIIOOOONNNN SSSSEEEEQQQQUUUUEEEENNNNCCCCEEEE
  1359.  
  1360. The receiving program sends the    AAAAttttttttnnnn sequence whenever it detects an
  1361. error and needs    to interrupt the sending program.
  1362.  
  1363. The default AAAAttttttttnnnn string    value is empty (no Attn    sequence).  The
  1364. receiving program resets Attn to the empty default before each
  1365. transfer session.
  1366.  
  1367. The sender specifies the Attn sequence in its optional ZSINIT frame.
  1368. The AAAAttttttttnnnn string    is terminated with a null.
  1369.  
  1370. Two meta-characters perform special functions:
  1371.  
  1372.  
  1373.  
  1374. __________
  1375.  
  1376.  5. One    in 256 for escaping ZDLE, about    two in 1024 for    data subpacket
  1377.     CRC's
  1378.  
  1379.  
  1380.  
  1381.  
  1382. Chapter    12          Rev 12-19-86 Typeset 12-19-86            21
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. Chapter    12          Rev 12-19-86 Typeset 12-19-86            22
  1391.  
  1392.  
  1393.  
  1394.    o+ \335 (octal) Send a break signal
  1395.  
  1396.    o+ \336 (octal) Pause    one second
  1397.  
  1398.  
  1399. 13.  FFFFRRRRAAAAMMMMEEEE TTTTYYYYPPPPEEEESSSS
  1400.  
  1401. The numeric values for the values shown    in boldface are    given in
  1402. _z_m_o_d_e_m._h.  Unused bits and unused bytes    in the header (ZP0...ZP3) are
  1403. set to 0.
  1404.  
  1405. 13.1  ZZZZRRRRQQQQIIIINNNNIIIITTTT
  1406.  
  1407. Sent by    the sending program, to    trigger    the receiving program to send
  1408. its ZRINIT header.  This avoids    the aggravating    startup    delay
  1409. associated with    XMODEM and Kermit transfers.  The sending program may
  1410. repeat the receive invitation (including ZRQINIT) if a response    is
  1411. not obtained at    first.
  1412.  
  1413. ZF0 contains ZCOMMAND if the program is    attempting to send a command,
  1414. 0 otherwise.
  1415.  
  1416. 13.2  ZZZZRRRRIIIINNNNIIIITTTT
  1417.  
  1418. Sent by    the receiving program.    ZF0 and    ZF1 contain the     bitwise or
  1419. of the receiver    capability flags:
  1420. #define    CANFDX    1 /* Receiver can send and receive simultaneously */
  1421. #define    CANOVIO    2 /* Receiver can receive during disk I/O */
  1422. #define    CANBRK    4 /* Rx    can send a break signal    */
  1423. #define    CANCRY    8 /* Receiver can decrypt */
  1424.  
  1425. ZP0 and    ZP1 contain the    size of    the receiver's buffer in bytes,    or 0
  1426. if nonstop I/O is allowed.
  1427.  
  1428. 13.3  ZZZZSSSSIIIINNNNIIIITTTT
  1429.  
  1430. Sender sends capability    flags (currently all 0)    (none currently
  1431. defined) followed by a binary data subpacket terminated    with ZZZZCCCCRRRRCCCCWWWW.
  1432. The data subpacket contains the    null terminated    AAAAttttttttnnnn sequence,
  1433. maximum    length 32 bytes    including the terminating null.
  1434.  
  1435. 13.4  ZZZZAAAACCCCKKKK
  1436.  
  1437. Acknowedgement to a ZZZZSSSSIIIINNNNIIIITTTT frame, ZZZZCCCCHHHHAAAALLLLLLLLEEEENNNNGGGGEEEE header, or    ZZZZCCCCRRRRCCCCWWWW data
  1438. subpacket.  ZP0    to ZP3 contain file offset.  The response to
  1439. ZCHALLENGE contains the    same 32    bit number received in the ZCHALLENGE
  1440. header.
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448. Chapter    13          Rev 12-19-86 Typeset 12-19-86            22
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. Chapter    13          Rev 12-19-86 Typeset 12-19-86            23
  1457.  
  1458.  
  1459.  
  1460. 13.5  ZZZZFFFFIIIILLLLEEEE
  1461.  
  1462. This frame denotes the beginning of a file transmission    attempt.
  1463. ZF0, ZF1, and ZF2 may contain options.    A value    of 0 in    each of    these
  1464. bytes implies no special treatment.  Options specified to the
  1465. receiver override options specified to the sender with the exception
  1466. of ZZZZCCCCBBBBIIIINNNN which overrides any other Conversion Option given to the
  1467. sender or receiver.
  1468.  
  1469.  
  1470. 13.5.1    ZZZZFFFF0000:::: CCCCoooonnnnvvvveeeerrrrssssiiiioooonnnn    OOOOppppttttiiiioooonnnn
  1471. If the receiver    does not recognize the Conversion Option, an
  1472. application dependent default conversion may apply.
  1473.  
  1474. ZZZZCCCCBBBBIIIINNNN "Binary" transfer    - inhibit conversion unconditionally
  1475.  
  1476. ZZZZCCCCNNNNLLLL Convert received end of line to local end of line
  1477.      convention.  The supported    end of line conventions    are
  1478.      CR/LF (most ASCII based operating systems except Unix
  1479.      and Macintosh), and NL (Unix).  Either of these two end
  1480.      of    line conventions meet the permissible ASCII
  1481.      definitions for Carriage Return and Line Feed/New Line.
  1482.      Neither the ASCII code nor    ZMODEM ZCNL encompass lines
  1483.      separated only by carriage    returns.  Other    processing
  1484.      appropriate to ASCII text files and the local operating
  1485.      system may    also be    applied    by the receiver.[1]
  1486.  
  1487. ZZZZCCCCRRRREEEECCCCOOOOVVVV    Recover/Resume interrupted file    transfer.  ZCREVOV is
  1488.      also useful for updating a    remote copy of a file that
  1489.      grows without resending of    old data.  If the destination
  1490.      file exists and is    no longer than the source, append to
  1491.      the destination file and start transfer at    the offset
  1492.      corresponding to the receiver's end of file.  This
  1493.      option does not apply if the source file is shorter.
  1494.      Files that    have been converted (e.g., ZCNL) or subject
  1495.      to    a single ended Transport Option    cannot have their
  1496.      transfers recovered.
  1497.  
  1498. 13.5.2    ZZZZFFFF1111:::: MMMMaaaannnnaaaaggggeeeemmmmeeeennnntttt    OOOOppppttttiiiioooonnnn
  1499. If the receiver    does not recognize the Management Option, the
  1500. file should be transferred normally.
  1501.  
  1502. ZZZZMMMMNNNNEEEEWWWW Transfer file if destination file    absent.     Otherwise,
  1503.      transfer file overwriting destination if the source file
  1504.      is    newer or longer.
  1505.  
  1506.  
  1507. __________
  1508.  
  1509.  1. Filtering RUBOUT, NULL, Ctrl-Z, etc.
  1510.  
  1511.  
  1512.  
  1513.  
  1514. Chapter    13          Rev 12-19-86 Typeset 12-19-86            23
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. Chapter    13          Rev 12-19-86 Typeset 12-19-86            24
  1523.  
  1524.  
  1525.  
  1526. ZZZZMMMMCCCCRRRRCCCC Compare the source and destination files.     Transfer if
  1527.      file lengths or file polynomials differ.
  1528.  
  1529. ZZZZMMMMAAAAPPPPNNNNDDDD Append source file contents to the end of the existing
  1530.      destination file (if any).
  1531.  
  1532. ZZZZMMMMCCCCLLLLOOOOBBBB Replace existing    destination file (if any).
  1533.  
  1534. ZZZZTTTTSSSSPPPPAAAARRRRSSSS    Special    processing for sparse file; each file segment
  1535.      is    transmitted as a separate frame, where the frames are
  1536.      not necessarily contiguous.  The sender should end    each
  1537.      segment with a ZCRCW (or possibly ZCRCQ) data subpacket
  1538.      and process the expected ZACK to insure no    data is    lost.
  1539.  
  1540. ZZZZMMMMDDDDIIIIFFFFFFFF Transfer    file if    destination file absent.  Otherwise,
  1541.      transfer file overwriting destination if files have
  1542.      different lengths or dates.
  1543.  
  1544. ZZZZMMMMPPPPRRRROOOOTTTT Protect destination file    by transferring    file only if
  1545.      the destination file is absent.
  1546.  
  1547. 13.5.3    ZZZZFFFF2222:::: TTTTrrrraaaannnnssssppppoooorrrrtttt OOOOppppttttiiiioooonnnn
  1548. If the receiver    does not implement the particular transport
  1549. option,    the file is copied without conversion for later
  1550. processing.
  1551.  
  1552. ZZZZTTTTLLLLZZZZWWWW Lempel-Ziv compression.  Transmitted data    will be
  1553.      identical to that produced    by ccccoooommmmpppprrrreeeessssssss 4444....0000    operating on
  1554.      a computer    with VAX byte ordering,    using 12 bit
  1555.      encoding.
  1556.  
  1557. ZZZZTTTTCCCCRRRRYYYYPPPPTTTT    Encryption.  An    initial    null terminated    string
  1558.      identifies    the key.  Details to be    determined.
  1559.  
  1560. ZZZZTTTTRRRRLLLLEEEE Run Length encoding, Details to be determined.
  1561.  
  1562. A ZZZZCCCCRRRRCCCCWWWW    data subpacket follows with file name, file length,
  1563. modification date, and other information described in a    later
  1564. chapter.
  1565.  
  1566. 13.6  ZZZZSSSSKKKKIIIIPPPP
  1567.  
  1568. Sent by    the receiver in    response to ZZZZFFFFIIIILLLLEEEE, makes the sender skip to
  1569. the next file.
  1570.  
  1571. 13.7  ZZZZNNNNAAAAKKKK
  1572.  
  1573. Indicates last header was garbled.  (See also ZZZZRRRRPPPPOOOOSSSS).
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580. Chapter    13          Rev 12-19-86 Typeset 12-19-86            24
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588. Chapter    13          Rev 12-19-86 Typeset 12-19-86            25
  1589.  
  1590.  
  1591.  
  1592. 13.8  ZZZZAAAABBBBOOOORRRRTTTT
  1593.  
  1594. Sent by    receiver to terminate batch file transfers when    requested by
  1595. the user.  Sender responds with    a ZZZZFFFFIIIINNNN sequence.[2]
  1596.  
  1597. 13.9  ZZZZFFFFIIIINNNN
  1598.  
  1599. Sent by    sending    program    to terminate a ZMODEM session.    Receiver
  1600. responds with its own ZZZZFFFFIIIINNNN.
  1601.  
  1602. 13.10  ZZZZRRRRPPPPOOOOSSSS
  1603.  
  1604. Sent by    receiver to force file transfer    to resume at file offset
  1605. given in ZP0...ZP3.
  1606.  
  1607. 13.11  ZZZZDDDDAAAATTTTAAAA
  1608.  
  1609. ZP0...ZP3 contain file offset.    One or more data subpackets follow.
  1610.  
  1611. 13.12  ZZZZEEEEOOOOFFFF
  1612.  
  1613. Sender reports End of File.  ZP0...ZP3 contain the ending file
  1614. offset.
  1615.  
  1616. 13.13  ZZZZFFFFEEEERRRRRRRR
  1617.  
  1618. Error in reading or writing file, protocol equivalent to ZZZZAAAABBBBOOOORRRRTTTT.
  1619.  
  1620. 13.14  ZZZZCCCCRRRRCCCC
  1621.  
  1622. Request    (receiver) and response    (sender) for file polynomial.
  1623. ZP0...ZP3 contain file polynomial.
  1624.  
  1625. 13.15  ZZZZCCCCHHHHAAAALLLLLLLLEEEENNNNGGGGEEEE
  1626.  
  1627. Request    sender to echo a random    number in ZP0...ZP3 in a ZACK frame.
  1628. Sent by    the receiving program to the sending program to    verify that
  1629. it is connected    to an operating    program, and was not activated by
  1630. spurious data or a Trojan Horse    message.
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639. __________
  1640.  
  1641.  2. Or ZZZZCCCCOOOOMMMMPPPPLLLL in case of server    mode.
  1642.  
  1643.  
  1644.  
  1645.  
  1646. Chapter    13          Rev 12-19-86 Typeset 12-19-86            25
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. Chapter    13          Rev 12-19-86 Typeset 12-19-86            26
  1655.  
  1656.  
  1657.  
  1658. 13.16  ZZZZCCCCOOOOMMMMPPPPLLLL
  1659.  
  1660. Request    now completed.
  1661.  
  1662. 13.17  ZZZZCCCCAAAANNNN
  1663.  
  1664. This is    a pseudo frame type returned by    gethdr() in response to    a
  1665. Session    Abort sequence.
  1666.  
  1667. 13.18  ZZZZFFFFRRRREEEEEEEECCCCNNNNTTTT
  1668.  
  1669. Sending    program    requests a ZACK    frame with ZP0...ZP3 containing    the
  1670. number of free bytes on    the current file system.  A value of 0
  1671. represents an indefinite amount    of free    space.
  1672.  
  1673. 13.19  ZZZZCCCCOOOOMMMMMMMMAAAANNNNDDDD
  1674.  
  1675. ZCOMMAND is sent in a binary frame.  ZZZZFFFF0000 contains 0000 or ZZZZCCCCAAAACCCCKKKK1111 (see
  1676. below).
  1677.  
  1678. A ZCRCW    data subpacket follows,    with the ASCII text command string
  1679. terminated with    a NULL character.  If the command is intended to be
  1680. executed by the    operating system hosting the receiving program
  1681. (e.g., "shell escape"),    it must    have "!" as the    first character.
  1682. Otherwise the command is meant to be executed by the application
  1683. program    which received the command.
  1684.  
  1685. If the receiver    detects    an illegal or badly formed command, the
  1686. receiver immediately responds with a ZCOMPL header with    an error
  1687. code in    ZP0...ZP3.
  1688.  
  1689. If ZF0 contained ZZZZCCCCAAAACCCCKKKK1111,,,, the receiver immediately responds with    a
  1690. ZCOMPL header with 0 status.
  1691.  
  1692. Otherwise, the receiver    responds with a    ZCOMPL header when the
  1693. operation is completed.     The exit status of the    completed command is
  1694. stored in ZP0...ZP3.  A    0 exit status implies nominal completion of
  1695. the command.
  1696.  
  1697. If the command causes a    file to    be transmitted,    the command sender
  1698. will see a ZRQINIT frame from the other    computer attempting to send
  1699. data.
  1700.  
  1701. The sender examines ZF0    of the received    ZRQINIT    header to verify it
  1702. is not an echo of its own ZRQINIT header.  It is illegal for the
  1703. sending    program    to command the receiving program to send a command.
  1704.  
  1705. If the receiver    program    does not implement command downloading,    it
  1706. should display the command to the standard error output, then return
  1707. a ZCOMPL header.
  1708.  
  1709.  
  1710.  
  1711.  
  1712. Chapter    13          Rev 12-19-86 Typeset 12-19-86            26
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. Chapter    13          Rev 12-19-86 Typeset 12-19-86            27
  1721.  
  1722.  
  1723.  
  1724. 14.  SSSSEEEESSSSSSSSIIIIOOOONNNN TTTTRRRRAAAANNNNSSSSAAAACCCCTTTTIIIIOOOONNNN EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  1725.  
  1726. 14.1  AAAA    ssssiiiimmmmpppplllleeee ffffiiiilllleeee ttttrrrraaaannnnssssffffeeeerrrr
  1727.  
  1728. A simple transaction, one file,    no errors, no CHALLENGE, overlapped
  1729. I/O:
  1730.  
  1731. Sender           Receiver
  1732.  
  1733. "rz\r"
  1734. ZRQINIT(0)
  1735.            ZRINIT
  1736. ZFILE
  1737.            ZRPOS
  1738. ZDATA data ...
  1739. ZEOF
  1740.            ZRINIT
  1741. ZFIN
  1742.            ZFIN
  1743. OO
  1744.  
  1745.  
  1746. 14.2  CCCChhhhaaaalllllllleeeennnnggggeeee    aaaannnndddd CCCCoooommmmmmmmaaaannnndddd DDDDoooowwwwnnnnllllooooaaaadddd
  1747.  
  1748.  
  1749. Sender           Receiver
  1750.  
  1751. "rz\r"
  1752. ZRQINIT(ZCOMMAND)
  1753.            ZCHALLENGE(rnd)
  1754. ZACK(rnd)
  1755.            ZRINIT
  1756. ZCOMMAND
  1757.            (Performs Command)
  1758.            ZCOMPL
  1759. ZFIN
  1760.            ZFIN
  1761. OO
  1762.  
  1763.  
  1764.  
  1765. 15.  ZZZZFFFFIIIILLLLEEEE FFFFRRRRAAAAMMMMEEEE FFFFIIIILLLLEEEE IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  1766.  
  1767. ZMODEM sends the same file information with the    ZZZZFFFFIIIILLLLEEEE frame data
  1768. that YMODEM Batch sends    in its block 0.
  1769.  
  1770. NNNN....BBBB....:::: OOOOnnnnllllyyyy tttthhhheeee ppppaaaatttthhhhnnnnaaaammmmeeee    ((((ffffiiiilllleeee nnnnaaaammmmeeee)))) ppppaaaarrrrtttt iiiissss mmmmaaaannnnddddaaaattttoooorrrryyyy....
  1771.  
  1772. PPPPaaaatttthhhhnnnnaaaammmmeeee The pathname (conventionally, the file    name) is sent as a
  1773.      null terminated ASCII string.  This is the    filename format    used
  1774.      by    the handle oriented MSDOS(TM) functions    and C library fopen
  1775.  
  1776.  
  1777.  
  1778. Chapter    15          Rev 12-19-86 Typeset 12-19-86            27
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786. Chapter    15          Rev 12-19-86 Typeset 12-19-86            28
  1787.  
  1788.  
  1789.  
  1790.      functions.     An assembly language example follows:
  1791.                DB      'foo.bar',0
  1792.      No    spaces are included in the pathname.  Normally only the    file
  1793.      name stem (no directory prefix) is    transmitted unless the
  1794.      sender has    selected YAM's ffff option    to send    the ffffuuuullllllll relative
  1795.      pathname.    The source drive designator (A:, B:, etc.) is not
  1796.      sent.
  1797.  
  1798.      Filename Considerations:
  1799.  
  1800.     o+ File names should be translated to lower case    unless the
  1801.       sending system supports upper/lower case file    names.    This
  1802.       is a convenience for users of    systems    (such as Unix) which
  1803.       store    filenames in upper and lower case.
  1804.  
  1805.     o+ The receiver should accommodate file names in    lower and
  1806.       upper    case.
  1807.  
  1808.     o+ When transmitting files between different operating
  1809.       systems, file    names must be acceptable to both the sender
  1810.       and receiving    operating systems.  If not, transformations
  1811.       should be applied to make the    file names acceptable.    If
  1812.       the transformations are unsuccessful,    an file    name should
  1813.       be invented be the receiving program.
  1814.  
  1815.      If    directories are    included, they are delimited by    /; i.e.,
  1816.      "subdir/foo" is acceptable, "subdir\foo" is not.
  1817.  
  1818. LLLLeeeennnnggggtttthhhh The file    length and each    of the succeeding fields are
  1819.      optional.[1] The length field is stored as    a decimal string
  1820.      counting the number of data bytes in the file.
  1821.  
  1822.      With ZMODEM, the receiver uses the    file length as an estimate
  1823.      only.  It may be used to display an estimate of the
  1824.      transmission time,    and may    be compared with the amount of free
  1825.      disk space.  The actual length of the received file is
  1826.      determined    by the data transfer.  A file may grow after
  1827.      transmission commences, and all the data will be sent.
  1828.  
  1829. MMMMooooddddiiiiffffiiiiccccaaaattttiiiioooonnnn DDDDaaaatttteeee A single space separates the modification date
  1830.      from the file length.
  1831.  
  1832.      The mod date is optional, and the filename    and length may be
  1833.      sent without requiring the    mod date to be sent.
  1834.  
  1835.  
  1836.  
  1837. __________
  1838.  
  1839.  1. Fields may not be skipped.
  1840.  
  1841.  
  1842.  
  1843.  
  1844. Chapter    15          Rev 12-19-86 Typeset 12-19-86            28
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852. Chapter    15          Rev 12-19-86 Typeset 12-19-86            29
  1853.  
  1854.  
  1855.  
  1856.      The mod date is sent as an    octal number giving the    time the
  1857.      ccccoooonnnntttteeeennnnttttssss of the file were last changed measured in    seconds    from
  1858.      Jan 1 1970    Universal Coordinated Time (GMT).  A date of 0
  1859.      implies the modification date is unknown and should be left as
  1860.      the date the file is received.
  1861.  
  1862.      This standard format was chosen to    eliminate ambiguities
  1863.      arising from transfers between different time zones.
  1864.  
  1865.      Two Microsoft blunders complicate the use of modification dates
  1866.      in    file transfers with MSDOS(TM) systems.    The first is the
  1867.      lack of timezone standardization in MS-DOS.  A file's creation
  1868.      time can not be known unless the timezone of the system that
  1869.      wrote the file[2] is known.  Unix solved this problem (for
  1870.      planet Earth, anyway) by stamping files with Universal Time
  1871.      (GMT).  Microsoft would have to include the timezone of origin
  1872.      in    the directory entries, but does    not.  Professional-YAM gets
  1873.      around this problem by using the zzzz    parameter which    is set to
  1874.      the number    of minutes local time lags GMT.     For files known to
  1875.      originate from a different    timezone, the ----zzzzTTTT option may be    used
  1876.      to    specify    TTTT as the timezone for an individual file transfer.
  1877.  
  1878.      The second    problem    is the lack of a separate file creation    date
  1879.      in    DOS.  Since some backup    schemes    used with DOS rely on the
  1880.      file creation date    to select files    to be copied to    the archive,
  1881.      back-dating the file modification date could interfere with the
  1882.      safety of the transferred files.  For this    reason,
  1883.      Professional-YAM does not modify the date of received files
  1884.      with the header information unless    the dddd parameter    is non zero.
  1885.  
  1886.  
  1887. FFFFiiiilllleeee MMMMooooddddeeee A single space separates the file mode from the
  1888.      modification date.     The file mode is stored as an octal string.
  1889.      Unless the    file originated    from a Unix system, the    file mode is
  1890.      set to 0.    rz(1) checks the file mode for the 0x8000 bit which
  1891.      indicates a Unix type regular file.  Files    with the 0x8000    bit
  1892.      set are assumed to    have been sent from another Unix (or
  1893.      similar) system which uses    the same file conventions.  Such
  1894.      files are not translated in any way.
  1895.  
  1896.  
  1897. SSSSeeeerrrriiiiaaaallll NNNNuuuummmmbbbbeeeerrrr A    single space separates the serial number from the
  1898.      file mode.     The serial number of the transmitting program is
  1899.      stored as an octal    string.     Programs which    do not have a serial
  1900.      number should omit    this field, or set it to 0.  The receiver's
  1901.  
  1902.  
  1903. __________
  1904.  
  1905.  2. Not    necessarily that of the    transmitting system!
  1906.  
  1907.  
  1908.  
  1909.  
  1910. Chapter    15          Rev 12-19-86 Typeset 12-19-86            29
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918. Chapter    15          Rev 12-19-86 Typeset 12-19-86            30
  1919.  
  1920.  
  1921.  
  1922.      use of this field is optional.
  1923.  
  1924. The file information is    terminated by a    null.  If only the pathname
  1925. is sent, the pathname is terminated with ttttwwwwoooo nulls.  The length    of
  1926. the file information subpacket,    including the trailing null, must
  1927. not exceed 1024    bytes; a typical length    is less    than 64    bytes.
  1928.  
  1929.  
  1930. 16.  PPPPEEEERRRRFFFFOOOORRRRMMMMAAAANNNNCCCCEEEE RRRREEEESSSSUUUULLLLTTTTSSSS
  1931.  
  1932. 16.1  CCCCoooommmmppppaaaattttiiiibbbbiiiilllliiiittttyyyy
  1933.  
  1934. Extensive testing has demonstrated ZMODEM to be    compatible with
  1935. satellite links, packet    switched networks, microcomputers,
  1936. minicomputers, regular and error correcting buffered modems at 75 to
  1937. 19200 bps.  ZMODEM's marked economy of reverse channel bandwith
  1938. allows modems that dynamically partition bandwidth between the two
  1939. directions to operate at optimal speeds.
  1940.  
  1941. 16.2  TTTThhhhrrrroooouuuugggghhhhppppuuuutttt
  1942.  
  1943. Between    two single task    PC-XT computers    sending    a program image    on
  1944. an in house Telenet link, SuperKermit provided 72 ch/sec throughput
  1945. at 1200    baud.  YMODEM-k    yielded    85 chars/sec, and ZMODEM provided
  1946. 113 chars/sec.    XMODEM was not measured, but would have    been much
  1947. slower based on    observed network propagation delays.
  1948.  
  1949. Recent tests downloading program images    to an IBM PC (4.7 mHz V20)
  1950. running    YAMK 15.68 with    table driven CRC calculation yielded a
  1951. throughput of about 17kb on a 19.2 kb direct connection.
  1952.  
  1953. 16.3  EEEErrrrrrrroooorrrr RRRReeeeccccoooovvvveeeerrrryyyy
  1954.  
  1955. Some tests of ZMODEM protocol error recovery performance have been
  1956. made.  A PC-AT with SCO    SYS V Xenix or DOS 3.1 was connected to    a PC
  1957. with DOS 2.1 either directly at    9600 bps or with unbuffered dial-up
  1958. 1200 bps modems.  The ZMODEM software was configured to    use 1024
  1959. byte data subpacket lengths above 2400 bps, 256    otherwise.
  1960.  
  1961. Because    no time    delays are necessary in    normal file transfers, per
  1962. file negotiations are much faster than with YMODEM, the    only
  1963. observed delay being the time required by the program(s) to update
  1964. logging    files.
  1965.  
  1966. During a file transfer,    a short    line hit seen by the receiver
  1967. usually    induces    a CRC error.  The interrupt sequence is    usually    seen
  1968. by the sender before the next data subpacket is    completely sent, and
  1969. the resultant loss of data throughput averages about half a data
  1970. subpacket per line hit.     At 1200 bps this is would be about .75
  1971. second lost per    hit.  At 10-5 error rate, this would degrade
  1972. throughput by about 9 per cent.
  1973.  
  1974.  
  1975.  
  1976. Chapter    16          Rev 12-19-86 Typeset 12-19-86            30
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. Chapter    16          Rev 12-19-86 Typeset 12-19-86            31
  1985.  
  1986.  
  1987.  
  1988. The throughput degradation increases with channel delay, as data
  1989. subpackets in transit through the channel are discarded    when an
  1990. error is detected.
  1991.  
  1992. A longer noise burst that affects both the receiver and    the sender's
  1993. reception of the interrupt sequence usually causes the sender to
  1994. remain silent until the    receiver times out in 10 seconds.  If the
  1995. round trip channel delay exceeds the receiver's    10 second timeout,
  1996. recovery from this type    of error may become difficult.
  1997.  
  1998. Noise affecting    only the sender    is usually ignored, with one common
  1999. exception.  Spurious XOFF characters generated by noise    stop the
  2000. sender until the receiver times    out and    sends an interrupt sequence
  2001. which concludes    with an    XON.
  2002.  
  2003. In summation, ZMODEM performance in the    presence of errors resembles
  2004. that of    X.PC and SuperKermit.  Short bursts cause minimal data loss.
  2005. Long bursts (such as pulse dialing noises) often require a timeout
  2006. error to restore the flow of data.
  2007.  
  2008.  
  2009. 17.  PPPPAAAACCCCKKKKEEEETTTT SSSSWWWWIIIITTTTCCCCHHHHEEEEDDDD NNNNEEEETTTTWWWWOOOORRRRKKKK CCCCOOOONNNNSSSSIIIIDDDDEEEERRRRAAAATTTTIIIIOOOONNNNSSSS
  2010.  
  2011. Flow control is    necessary for printing messages    and directories, and
  2012. for streaming file transfer protocols.    A non transparent flow
  2013. control    is incompatible    with XMODEM and    YMODEM transfers.  XMODEM
  2014. and YMODEM protocols require complete transparency of all 256 8    bit
  2015. codes to operate properly.
  2016.  
  2017. The best flow control (when X.25 or hardware CTS is unavailable)
  2018. does not "eat" any characters at all.  When the    PAD's buffer almost
  2019. fills up, an XOFF should be emitted.  When the buffer is no longer
  2020. nearly full, send an XON.  Otherwise, the network should neither
  2021. generate nor eat XON or    XOFF control characters.
  2022.  
  2023. On Telenet, this can be    met by setting CCIT X3 5:1 and 12:0 at bbbbooootttthhhh
  2024. ends of    the network.  For best throughput, parameter 64    (advance
  2025. ACK) should be set to something    like 4.     Packets should    be forwarded
  2026. when the packet    is a full 128 bytes, or    after a    moderate delay
  2027. (3:0,4:10,6:0).
  2028.  
  2029. With PC-Pursuit, it is sufficient to set parameter 5 to    1 at both
  2030. ends.
  2031.  
  2032. For YMODEM, PAD    buffering should guarantee that    a minimum of 1040
  2033. characters can be sent in a burst without loss of data or generation
  2034. of flow    control    characters.  Failure to    provide    this buffering will
  2035. generate excessive retries with    YMODEM.
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042. Chapter    17          Rev 12-19-86 Typeset 12-19-86            31
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050. Chapter    17          Rev 12-19-86 Typeset 12-19-86            32
  2051.  
  2052.  
  2053.  
  2054.          TTTTAAAABBBBLLLLEEEE 1111....  Network and Flow    Control    Compatibility
  2055.  
  2056. _____________________________________________________________________________
  2057. |   Connectivity    |  Interactive|  XMODEM|  WXMODEM|    SUPERKERMIT|  ZMODEM|
  2058. _|________________________________________|____________________________|__________________|____________________|____________________________|__________________|_
  2059. _|____________________|______________|_________|__________|______________|_________|
  2060. |Direct    Connect        |  YES      |  YES   |  YES    |    YES       |  YES   |
  2061. _|____________________|______________|_________|__________|______________|_________|
  2062. |Network, no FC        |  NNNNOOOO      |  YES   |  (4)    |    (6)       |  (1)   |
  2063. _|____________________|______________|_________|__________|______________|_________|
  2064. |Net, transparent FC|  YES      |  YES   |  YES    |    YES       |  YES   |
  2065. _|____________________|______________|_________|__________|______________|_________|
  2066. |Net, non-trans. FC |  YES      |  NNNNOOOO       |  NO(5)  |    YES       |  YES   |
  2067. _|____________________|______________|_________|__________|______________|_________|
  2068. |Network, 7 bit        |  YES      |  NNNNOOOO       |  NO     |    YES(2)       |  YES(3)|
  2069. _|____________________|______________|_________|__________|______________|_________|
  2070.  
  2071. (1) ZMODEM can optimize    window size or burst length for    fastest
  2072. transfers.
  2073. (2) Parity bits    must be    encoded, slowing binary    transfers.
  2074. (3) Natural protocol extension possible    for encoding data to 7 bits.
  2075. (4) Small WXMODEM window size may may allow operation.
  2076. (5) Some flow control codes are    not escaped in WXMODEM.
  2077. (6) Kermit window size must be reduced to avoid    buffer overrun.
  2078.  
  2079.  
  2080.  
  2081. 18.  PPPPEEEERRRRFFFFOOOORRRRMMMMAAAANNNNCCCCEEEE CCCCOOOOMMMMPPPPAAAARRRRIIIISSSSOOOONNNN TTTTAAAABBBBLLLLEEEESSSS
  2082.  
  2083.  
  2084. "Round Trip Delay Time"    includes the time for the last byte in a
  2085. packet to propagate through the    operating systems and network to the
  2086. receiver, plus the time    for the    receiver's response to that packet
  2087. to propagate back to the sender.
  2088.  
  2089. The figures shown below    are calculated for round trip delay times of
  2090. 40 milliseconds    and 5 seconds.    Shift registers    in the two computers
  2091. and a pair of 212 modems generate a round trip delay time on the
  2092. order of 40 milliseconds.  Operation with busy timesharing computers
  2093. and networks can easily    generate round trip delays of five seconds.
  2094. Because    the round trip delays cause visible interruptions of data
  2095. transfer when using XMODEM protocol, the subjective effect of these
  2096. delays is greatly exaggerated, especially when the user    is paying
  2097. for connect time.
  2098.  
  2099. A 102400 byte binary file with randomly    distributed codes is sent at
  2100. 1200 bps 8 data    bits, 1    stop bit.  The calculations assume no
  2101. transmission errors.  For each of the protocols, only the per file
  2102. functions are considered.  Processor and I/O overhead are not
  2103. included.  YM-k    refers to YMODEM with 1024 byte    data packets.  YM-g
  2104. refers to the YMODEM "g" option.  ZMODEM uses 256 byte data
  2105.  
  2106.  
  2107.  
  2108. Chapter    18          Rev 12-19-86 Typeset 12-19-86            32
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116. Chapter    18          Rev 12-19-86 Typeset 12-19-86            33
  2117.  
  2118.  
  2119.  
  2120. subpackets for this example.  SuperKermit uses maximum packet size,
  2121. 8 bit transparent transmission,    no run length compression.  The    4
  2122. block WXMODEM window is    too small to span the 5    second delay in    this
  2123. example; the resulting thoughput degradation is    ignored.
  2124.  
  2125. For comparison,    a straight "dump" of the file contents with no file
  2126. management or error checking takes 853 seconds.
  2127.  
  2128.          TTTTAAAABBBBLLLLEEEE 2222....  Protocol Overhead Information
  2129.        (102400 byte    binary file, 5 Second Round Trip)
  2130.  
  2131. ____________________________________________________________________________
  2132. |      Protocol          |     XMODEM|  YM-k |  YM-g|     ZMODEM|  SKermit|  WXMODEM|
  2133. _|____________________________________________|__________________|________________|______________|__________________|____________________|____________________|_
  2134. _|______________________|_________|________|_______|_________|__________|__________|
  2135. |Protocol Round    Trips |     804   |  104  |  5   |     5     |  5     |  4       |
  2136. _|______________________|_________|________|_______|_________|__________|__________|
  2137. |Trip Time at 40ms    |     32s   |  4s   |  0   |     0     |  0     |  0       |
  2138. _|______________________|_________|________|_______|_________|__________|__________|
  2139. |Trip Time at 5s      |     4020s |  520s |  25s |     25s   |  25     |  20       |
  2140. _|____________________________________________|__________________|________________|______________|__________________|____________________|____________________|_
  2141. _|______________________|_________|________|_______|_________|__________|__________|
  2142. |Overhead Characters  |     4803  |  603  |  503 |     3600  |  38280     |  8000   |
  2143. _|____________________________________________|__________________|________________|______________|__________________|____________________|____________________|_
  2144. _|______________________|_________|________|_______|_________|__________|__________|
  2145. |Transfer Time at 0s  |     893s  |  858s |  857s|     883s  |  1172s     |  916s   |
  2146. _|______________________|_________|________|_______|_________|__________|__________|
  2147. |Transfer Time at 40ms|     925s  |  862s |  857s|     883s  |  1172s     |  916s   |
  2148. _|______________________|_________|________|_______|_________|__________|__________|
  2149. |Transfer Time at 5s  |     5766s |  1378s|  882s|     918s  |  1197s     |  936s   |
  2150. _|______________________|_________|________|_______|_________|__________|__________|
  2151.  
  2152.  
  2153.          FFFFiiiigggguuuurrrreeee    4444....  Transmission Time Comparison
  2154.        (102400 byte    binary file, 5 Second Round Trip)
  2155.  
  2156. ************************************************** XMODEM
  2157. ************ YMODEM-K
  2158. ********** SuperKermit (Sliding    Windows)
  2159. *******    ZMODEM 16kb Segmented Streaming
  2160. *******    ZMODEM Full Streaming
  2161. *******    YMODEM-G
  2162.  
  2163.     TTTTAAAABBBBLLLLEEEE 3333....  Local    Timesharing Computer Download Performance
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174. Chapter    18          Rev 12-19-86 Typeset 12-19-86            33
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182. Chapter    18          Rev 12-19-86 Typeset 12-19-86            34
  2183.  
  2184.  
  2185.  
  2186. __________________________________________________________________________
  2187. |    Command    |  Protocol|  Time/HD|    Time/FD|  Throughput|  Efficiency|
  2188. _|________________________________|______________________|____________________|____________________|__________________________|__________________________|_
  2189. _|________________|___________|__________|__________|_____________|_____________|
  2190. |kermit    -x    |  Kermit  |  1:49   |    2:03   |  327        |  34%     |
  2191. _|________________|___________|__________|__________|_____________|_____________|
  2192. |sz -Xa    phones.t|  XMODEM  |  1:20   |    1:44   |  343        |  36%     |
  2193. _|________________|___________|__________|__________|_____________|_____________|
  2194. |sz -a phones.t    |  ZMODEM  |   :39   |     :48   |  915        |  95%     |
  2195. _|________________|___________|__________|__________|_____________|_____________|
  2196.  
  2197.  
  2198. Times were measured downloading    a 35721    character text file at 9600
  2199. bps, from Santa    Cruz SysV 2.1.2    Xenix on a 9 mHz IBM PC-AT to DOS
  2200. 2.1 on an IBM PC.  Xenix was in    multiuser mode but otherwise idle.
  2201. Transfer times to PC hard disk and floppy disk destinations are
  2202. shown.
  2203.  
  2204. C-Kermit 4.2(030) used server mode and file compression, sending to
  2205. Pro-YAM    15.52 using 0 delay and    a "get phones.t" command.
  2206.  
  2207. Crosstalk XVI 3.6 used XMODEM 8    bit checksum (CRC not available) and
  2208. an "ESC    rx phones.t" command.  The Crosstalk time does nnnnooootttt include
  2209. the time needed    to enter the extra commands not    needed by Kermit and
  2210. ZMODEM.
  2211.  
  2212. Professional-YAM used ZMODEM AutoDownload.  ZMODEM times included a
  2213. security challenge to the sending program.
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240. Chapter    18          Rev 12-19-86 Typeset 12-19-86            34
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248. Chapter    18          Rev 12-19-86 Typeset 12-19-86            35
  2249.  
  2250.  
  2251.  
  2252.                TTTTAAAABBBBLLLLEEEE 4444....     Protocol Checklist
  2253.  
  2254. _________________________________________________________________________
  2255. |Item               XMODEM  WXMODEM    YMDM-k     YMDM-g     ZMODEM     SKermit|
  2256. _|________________________________________|__________________|__________________|__________________|________________|________________|__________________|_
  2257. |IIIINNNN SSSSEEEERRRRVVVVIIIICCCCEEEE        |  1979  | 1986   |    1982   | 1985  | 1986  | 1985    |
  2258. _|____________________|_________|_________|_________|________|________|_________|
  2259. |UUUUSSSSEEEERRRR FFFFEEEEAAAATTTTUUUURRRREEEESSSS        |         |          |           |       |       |    |
  2260. |User Friendly I/F  |  -     | -      |    -      | -     | YES   | -    |
  2261. |Commands/batch        |  2*N   | 2*N    |    2      | 2     | 1     | 1(1)    |
  2262. |Commands/file        |  2     | 2      |    0      | 0     | 0     | 0    |
  2263. |Command Download   |  -     | -      |    -      | -     | YES   | YES(6)    |
  2264. |Menu Compatible    |  -     | -      |    -      | -     | YES   | -    |
  2265. |Transfer Recovery  |  -     | -      |    -      | -     | YES   | -    |
  2266. |File Management    |  -     | -      |    -      | -     | YES   | -    |
  2267. |Security Check        |  -     | -      |    -      | -     | YES   | -    |
  2268. |X/YMODEM Fallback  |  YES   | YES    |    YES    | YES   | YES   | -    |
  2269. _|____________________|_________|_________|_________|________|________|_________|
  2270. |CCCCOOOOMMMMPPPPAAAATTTTIIIIBBBBIIIILLLLIIIITTTTYYYY        |         |          |           |       |       |    |
  2271. |Dynamic Files        |  YES   | YES    |    FFFFAAAAIIIILLLL   | FFFFAAAAIIIILLLL  | YES   | YES    |
  2272. |Packet    SW NETS        |  -     | YES    |    -      | -     | YES   | YES    |
  2273. |7 bit PS NETS        |  -     | -      |    -      | -     | (8)   | YES    |
  2274. |Old Mainframes        |  -     | -      |    -      | -     | (8)   | YES    |
  2275. |CP/M-80        |  YES   | YES    |    YES    | -     | YES(9)| -    |
  2276. _|____________________|_________|_________|_________|________|________|_________|
  2277. |AAAATTTTTTTTRRRRIIIIBBBBUUUUTTTTEEEESSSS        |         |          |           |       |       |    |
  2278. |Reliability(5)        |  fair  | poor   |    fair(5)| none  | BEST  | HIGH    |
  2279. |Streaming        |  -     | YES    |    -      | YES   | YES   | YES    |
  2280. |Overhead(2)        |  7%    | 7%     |    1%     | 1%    | 1%    | 30%    |
  2281. |Faithful Xfers        |  -     | -      |    YES(3) | YES(3)| YES   | YES    |
  2282. |Preserve Date        |  -     | -      |    YES    | YES   | YES   | -    |
  2283. _|____________________|_________|_________|_________|________|________|_________|
  2284. |CCCCOOOOMMMMPPPPLLLLEEEEXXXXIIIITTTTYYYY        |         |          |           |       |       |    |
  2285. |CRC-16            |  -     | REQD   |    REQD   | REQD  | REQD  | opt    |
  2286. |32 bit    math        |  -     | -      |    (3)    | (3)   | REQD  | -    |
  2287. |No-Wait Sample        |  -     | REQD   |    -      | -     | opt   | REQD    |
  2288. |Ring Buffers        |  -     | REQD   |    -      | -     | opt   | REQD    |
  2289. |XMODEM    Similar        |  YES   | LOW    |    HIGH   | HIGH  | LOW   | NONE    |
  2290. |Complexity        |  LOW(5)| MED    |    LOW(5) | LOW   | MED   | HIGH    |
  2291. _|____________________|_________|_________|_________|________|________|_________|
  2292. |EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS        |         |          |           |       |       |    |
  2293. |Server    Operation   |  -     | -      |    -      | -     | YES(4)| YES    |
  2294. |Multiple Threads   |  -     | -      |    -      | -     | future| -    |
  2295. _|________________________________________|__________________|__________________|__________________|________________|________________|__________________|_
  2296.  
  2297. NOTES:
  2298. (1) Server mode    only
  2299. (2) Character count, binary file, transparent channel
  2300. (3) 32 bit math    needed for accurate transfer (no garbage added)
  2301. (4) AutoDownload operation
  2302. (5) X/YMODEM gives high    reliability with special data recovery
  2303.  
  2304.  
  2305.  
  2306. Chapter    18          Rev 12-19-86 Typeset 12-19-86            35
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314. Chapter    18          Rev 12-19-86 Typeset 12-19-86            36
  2315.  
  2316.  
  2317.  
  2318. alogrithyms.  These proprietary    reliability enhancemnets add greatly
  2319. to software complexity
  2320. (6) Server commands only
  2321. (7) No provision for transfers across time zones
  2322. (8) Future enhancement provided    for
  2323. (9) With Segmented Streaming
  2324. WXMODEM: XMODEM    derivative with    data encoding and Windowing
  2325. FAST: File transfer protocol requiring end-to-end 8-bit    transparent,
  2326. error free communications.
  2327.  
  2328.  
  2329.  
  2330. 19.  FFFFUUUUTTTTUUUURRRREEEE EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS
  2331.  
  2332. Future extensions include:
  2333.  
  2334.    o+ Compatibility with    7 bit networks
  2335.  
  2336.    o+ Server/Link Level operation: An END-TO-END    error corrected
  2337.      program to    program    session    is required for    financial and other
  2338.      sensitive applications.
  2339.  
  2340.    o+ 32    bit CRC: for sensitive applications
  2341.  
  2342.    o+ Multiple independent threads
  2343.  
  2344.    o+ Encryption
  2345.  
  2346.    o+ Compression
  2347.  
  2348.    o+ File Comparision
  2349.  
  2350.    o+ Selective transfer    within a file (e.g., modified segments of a
  2351.      database file).
  2352.  
  2353.  
  2354. 20.  RRRREEEEVVVVIIIISSSSIIIIOOOONNNNSSSS
  2355.  
  2356. 12-19-86: 0 Length ZCRCW data subpacket    sent in    response to ZPAD or
  2357. ZDELE detected on reverse channel has been changed to ZCRCE.  The
  2358. reverse    channel    is now checked for activity before sending each
  2359. ZDATA header.
  2360. 11-08-86: Minor    changes    for clarity.
  2361. 10-2-86:  ZCNL definition expanded.
  2362. 9-11-86:  ZMPROT file management option    added.
  2363. 8-20-86:  More performance data    included.
  2364. 8-4-86:     ASCII DLE (Ctrl-P, 020) now escaped; compatible with
  2365. previous versions.  More document revisions for    clarity.
  2366. 7-15-86: This document was extensively edited to improve clarity and
  2367. correct    small errors.  The definition of the ZMNEW management option
  2368. was modified, and the ZMDIFF management    option was added.  The
  2369.  
  2370.  
  2371.  
  2372. Chapter    20          Rev 12-19-86 Typeset 12-19-86            36
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380. Chapter    20          Rev 12-19-86 Typeset 12-19-86            37
  2381.  
  2382.  
  2383.  
  2384. cancel sequence    was changed from two to    five CAN characters after
  2385. spurious two character cancel sequences    were detected.
  2386.  
  2387.  
  2388. 21.  MMMMOOOORRRREEEE IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  2389.  
  2390. More information may be    obtained by calling TeleGodzilla at
  2391. 503-621-3746.
  2392.  
  2393. UUCP sites can obtain the nroff/troff source to    this file with
  2394.       uucp omen!/usr/caf/public/zmodem/zmodem.mm /tmp
  2395.  
  2396. A continually updated list of available    files is stored    in
  2397. /usr/spool/uucppublic/FILES.
  2398.  
  2399. The following L.sys line allows    UUCP to    call site "omen" via Omen's
  2400. bulletin board system "TeleGodzilla".  TeleGodzilla uses Pro-YAM in
  2401. host operation.
  2402.  
  2403. In response to TeleGodzilla's "Name Please:" uucico gives the
  2404. Pro-YAM    "link" command as a user name.    The password (Giznoid)
  2405. controls access    to the Xenix system connected to the IBM PC's other
  2406. serial port.  Communications between Pro-YAM and Xenix use 9600    bps;
  2407. YAM converts this to the caller's speed.
  2408.  
  2409. Finally, the calling uucico logs in as uucp.
  2410.  
  2411.  
  2412. omen Any ACU 1200 1-503-621-3746 e:--e:    link d:    Giznoid    n:--n: uucp
  2413.  
  2414.  
  2415.  
  2416. 22.  ZZZZMMMMOOOODDDDEEEEMMMM PPPPRRRROOOOGGGGRRRRAAAAMMMMSSSS
  2417.  
  2418. A copy of this document, a demonstration version of
  2419. Professional-YAM, a flash-up tree structured help file and
  2420. processor, are available in _Z_M_O_D_E_M._A_R_C on TeleGodzilla.     This file
  2421. must be    unpacked with _A_R_C-_E._C_O_M    compatible with    ARC5x files.  _A_R_C-
  2422. _E._C_O_M is also available    on TeleGodzilla.
  2423.  
  2424. ZZZZCCCCOOOOMMMMMMMM, a "user supported" communications program, also includes
  2425. ZMODEM as well as Omen's highly    acclaimed XMODEM and YMODEM support.
  2426.  
  2427. Source code and    manual pages for UNIX programs are available on
  2428. TeleGodzilla in    _R_Z_S_Z_1._S_H_Q and _R_Z_S_Z_2._S_H_Q, squeezed "shell archives".
  2429. To use these files, unsqueeze them with    YAMDEMO's "usq"    command,
  2430. upload them to Unix, and then execute them as shell scripts to break
  2431. them into the program and documentation    source files.  More detailed
  2432. instructions may be found in Chapter 8 of the Professional-YAM
  2433. User's manual.    Most Unix like systems are supported, including    V7,
  2434. Sys III, 4.x BSD, SYS V, Idris,    Coherent, and Regulus.
  2435.  
  2436.  
  2437.  
  2438. Chapter    22          Rev 12-19-86 Typeset 12-19-86            37
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446. Chapter    22          Rev 12-19-86 Typeset 12-19-86            38
  2447.  
  2448.  
  2449.  
  2450. 22.1  AAAAddddddddiiiinnnngggg ZZZZMMMMOOOODDDDEEEEMMMM ttttoooo DDDDOOOOSSSS PPPPrrrrooooggggrrrraaaammmmssss
  2451.  
  2452. 22.1.1    YYYYAAAAMMMMDDDDEEEEMMMMOOOO....EEEEXXXXEEEE
  2453. DOS programs such as bulletin boards may call ZCOMM.EXE    or
  2454. YAMDEMO.EXE with the DOS EXEC function to support fast,    reliable
  2455. ZMODEM file transfers.    This method allows program developers to add
  2456. ZMODEM support with a minimum of software development at the expense
  2457. of higher memory utilization than built-in routines.
  2458.  
  2459. YAMDEMO.EXE beginning with Version 15.61 include an _x_m_o_d_e_m command
  2460. which performs the following functions:
  2461.  
  2462.  o+ Sets    _r_e_s_t_r_i_c_t_e_d opertaion, restricting pathnames and    disallowing
  2463.    modification    of existing files
  2464.  
  2465.  o+ Causes error    messages to be sent to the modem
  2466.  
  2467.  o+ Forces an exit after    the command is finished
  2468.  
  2469. When YAMDEMO.EXE is used in this way, the default setup    file
  2470. DEMOPHON.T should be overriden with the    DOS environment    variable
  2471. PHONES:
  2472.               set PHONES=C:/newphone.t
  2473. where newphone.t contains
  2474. setup            return
  2475. (other commands    may be added as    necessary).
  2476.  
  2477. If a comm port other than COM1 is used,    the DPORT environment
  2478. variable should    be set:
  2479.                 set    DPORT=2
  2480.  
  2481. The Online help    processor included in ZMODEM.ARC and the
  2482. Professional-YAM User's    Manual contain other useful information    that
  2483. applies    to YAMDEMO.EXE.
  2484.  
  2485. YAMDEMO.EXE unmodified may be copied and used without licensing    or
  2486. other liability.  Omen Technology requests that    YAMDEMO.EXE be
  2487. distributed only in conjunction    with all the files included in
  2488. ZMODEM.ARC, as distributed by Omen, with no files deleted.
  2489.  
  2490.  
  2491. 22.1.2    DDDDSSSSZZZZ....EEEEXXXXEEEE
  2492. _D_S_Z is a small program that supports XMODEM, YMODEM, and ZMODEM    file
  2493. transfers.  It may be called as
  2494.              dsz port 2    sz file1 file2
  2495. to send    files, or as
  2496.                dsz port 2 rz
  2497. to receive zero    or more    file(s), or as
  2498.              dsz port 2    rz filea fileb
  2499. to receive two files, the first    to _f_i_l_e_a and the second    (if sent) to
  2500. _f_i_l_e_b.    This form of _d_s_z may be    used to    control    the pathname of
  2501.  
  2502.  
  2503.  
  2504. Chapter    22          Rev 12-19-86 Typeset 12-19-86            38
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512. Chapter    22          Rev 12-19-86 Typeset 12-19-86            39
  2513.  
  2514.  
  2515.  
  2516. incoming file(s).  In this example, if the sending program attempted
  2517. to send    a third    file, the transfer would be terminated.
  2518.  
  2519.  
  2520. 23.  YYYYMMMMOOOODDDDEEEEMMMM PPPPRRRROOOOGGGGRRRRAAAAMMMMSSSS
  2521.  
  2522. Unix programs supporting the YMODEM protocol are available on
  2523. TeleGodzilla in    the "upgrade" subdirectory as RBSB.SHQ (a SQueezed
  2524. shell archive).     Most Unix like    systems    are supported, including V7,
  2525. Sys III, 4.2 BSD, SYS V, Idris,    Coherent, and Regulus.
  2526.  
  2527. A version for VAX-VMS is available in VRBSB.SHQ, in the    same
  2528. directory.
  2529.  
  2530. Irv Hoff has added YMODEM 1k packets and YMODEM    batch transfers    to
  2531. the KMD    and IMP    series programs, which replace the XMODEM and
  2532. MODEM7/MDM7xx series respectively.  Overlays are available for a
  2533. wide variety of    CP/M systems.
  2534.  
  2535. Many other programs, including MEX and MEX-PC also support some    of
  2536. the YMODEM extensions.
  2537.  
  2538. Questions about    YMODEM,    the Professional-YAM communications program,
  2539. and requests for evaluation copies may be directed to:
  2540.  
  2541.      Chuck Forsberg
  2542.      Omen Technology Inc
  2543.      17505-V Sauvie Island Road
  2544.      Portland Oregon 97231
  2545.      Voice: 503-621-3406
  2546.      Modem (TeleGodzilla): 503-621-3746
  2547.      Usenet: ...!tektronix!reed!omen!caf
  2548.      Compuserve: 70007,2304
  2549.      Source: TCE022
  2550.  
  2551.                   Yours    very truly,
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570. Chapter    23          Rev 12-19-86 Typeset 12-19-86            39
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.                   CONTENTS
  2583.  
  2584.  
  2585.  1.  INTENDED AUDIENCE................................................     2
  2586.  
  2587.  2.  EVOLUTION OF ZMODEM..............................................     2
  2588.  
  2589.  3.  ACKNOWLEDGMENTS..................................................     4
  2590.  
  2591.  4.  RELATED DOCUMENTS................................................     4
  2592.  
  2593.  5.  ROSETTA STONE....................................................     5
  2594.  
  2595.  6.  WHY DEVELOP ZMODEM?..............................................     5
  2596.  
  2597.  7.  ZMODEM Protocol Design Criteria..................................     7
  2598.      7.1    Ease of Use...............................................     7
  2599.      7.2    Throughput................................................     8
  2600.      7.3    Integrity and Robustness..................................     8
  2601.      7.4    Ease of Implementation....................................     8
  2602.  
  2603.  8.  ZMODEM REQUIREMENTS..............................................     9
  2604.      8.1    File Contents.............................................     9
  2605.  
  2606.  9.  ZMODEM BASICS....................................................    10
  2607.      9.1    Packetization.............................................    10
  2608.      9.2    Link Escape    Encoding......................................    11
  2609.      9.3    Header....................................................    12
  2610.      9.4    Binary Data    Subpackets....................................    14
  2611.      9.5    ASCII Encoded Data Subpacket..............................    14
  2612.  
  2613. 10.  PROTOCOL TRANSACTION OVERVIEW....................................    14
  2614.      10.1   Session Startup...........................................    14
  2615.      10.2   File Transmission.........................................    15
  2616.      10.3   Session Cleanup...........................................    17
  2617.      10.4   Session Cancel Sequence...................................    18
  2618.  
  2619. 11.  STREAMING TECHNIQUES / ERROR RECOVERY............................    19
  2620.      11.1   Full Streaming with    Sampling..............................    19
  2621.      11.2   Full Streaming with    Reverse    Interrupt.....................    20
  2622.      11.3   Full Streaming with    a Sliding Window......................    20
  2623.      11.4   Full Streaming over    Error Free Channels...................    21
  2624.      11.5   Segmented Streaming.......................................    21
  2625.  
  2626. 12.  ATTENTION SEQUENCE...............................................    21
  2627.  
  2628. 13.  FRAME TYPES......................................................    22
  2629.      13.1   ZRQINIT...................................................    22
  2630.      13.2   ZRINIT....................................................    22
  2631.      13.3   ZSINIT....................................................    22
  2632.      13.4   ZACK......................................................    22
  2633.  
  2634.  
  2635.  
  2636.                   - i -
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.      13.5   ZFILE.....................................................    23
  2649.      13.6   ZSKIP.....................................................    24
  2650.      13.7   ZNAK......................................................    24
  2651.      13.8   ZABORT....................................................    25
  2652.      13.9   ZFIN......................................................    25
  2653.      13.10  ZRPOS.....................................................    25
  2654.      13.11  ZDATA.....................................................    25
  2655.      13.12  ZEOF......................................................    25
  2656.      13.13  ZFERR.....................................................    25
  2657.      13.14  ZCRC......................................................    25
  2658.      13.15  ZCHALLENGE................................................    25
  2659.      13.16  ZCOMPL....................................................    26
  2660.      13.17  ZCAN......................................................    26
  2661.      13.18  ZFREECNT..................................................    26
  2662.      13.19  ZCOMMAND..................................................    26
  2663.  
  2664. 14.  SESSION TRANSACTION EXAMPLES.....................................    27
  2665.      14.1   A simple file transfer....................................    27
  2666.      14.2   Challenge and Command Download............................    27
  2667.  
  2668. 15.  ZFILE FRAME FILE INFORMATION.....................................    27
  2669.  
  2670. 16.  PERFORMANCE RESULTS..............................................    30
  2671.      16.1   Compatibility.............................................    30
  2672.      16.2   Throughput................................................    30
  2673.      16.3   Error Recovery............................................    30
  2674.  
  2675. 17.  PACKET SWITCHED NETWORK CONSIDERATIONS...........................    31
  2676.  
  2677. 18.  PERFORMANCE COMPARISON TABLES....................................    32
  2678.  
  2679. 19.  FUTURE EXTENSIONS................................................    36
  2680.  
  2681. 20.  REVISIONS........................................................    36
  2682.  
  2683. 21.  MORE INFORMATION.................................................    37
  2684.  
  2685. 22.  ZMODEM PROGRAMS..................................................    37
  2686.      22.1   Adding ZMODEM to DOS Programs.............................    38
  2687.  
  2688. 23.  YMODEM PROGRAMS..................................................    39
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.                   - ii -
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.                  LIST OF FIGURES
  2718.  
  2719.  
  2720. Figure 1.  Order of Bytes in Header...................................    12
  2721.  
  2722. Figure 2.  Binary Header..............................................    13
  2723.  
  2724. Figure 3.  HEX Header.................................................    13
  2725.  
  2726. Figure 4.  Transmission    Time Comparison...............................    33
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.                  - iii -
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.                   LIST OF TABLES
  2784.  
  2785.  
  2786. TABLE 1.  Network and Flow Control Compatibility......................    32
  2787.  
  2788. TABLE 2.  Protocol Overhead Information...............................    33
  2789.  
  2790. TABLE 3.  Local    Timesharing Computer Download Performance.............    33
  2791.  
  2792. TABLE 4.  Protocol Checklist..........................................    35
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.                   - iv -
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.      The ZMODEM    Asynchronous Inter Application File Transfer Protocol
  2845.  
  2846.                   Chuck Forsberg
  2847.  
  2848.                Omen    Technology Inc
  2849.  
  2850.  
  2851.                  _A_B_S_T_R_A_C_T
  2852.  
  2853.  
  2854.  
  2855. The ZMODEM file    transfer protocol provides efficient file transfers with
  2856. high speed buffered modems, timesharing    systems, satellite relays, and
  2857. wide area packet switched networks.
  2858.  
  2859. ZMODEM greatly simplifies file transfers compared to XMODEM.  In addition
  2860. to allowing a friendly user interface, ZMODEM provides Personal    Computer
  2861. and other users    an efficient, accurate,    and robust file    transfer method.
  2862.  
  2863. ZMODEM provides    advanced file management features including AutoDownload
  2864. (Automatic file    Download initiated without user    intervention), aborted
  2865. transfer recovery, selective file transfers, and security verified command
  2866. downloading.
  2867.  
  2868. ZMODEM protocol    features allow implementation on a wide    variety    of systems
  2869. operating in a wide variety of environments.  A    choice of buffering and
  2870. windowing modes    allows ZMODEM to operate on systems that cannot    support
  2871. other streaming    protocols.  Finely tuned control character escaping allows
  2872. operation with real world networks without Kermit's high overhead.
  2873.  
  2874. Although ZMODEM    software is more complex than primitive    XMODEM routines,
  2875. actual C source    code to    pppprrrroooodddduuuuccccttttiiiioooonnnn programs allows developers to upgrade
  2876. their applications with    efficient, reliable ZMODEM file    transfers with a
  2877. minimum    of effort.
  2878.  
  2879. ZMODEM is carefully designed to    provide    these benefits using a minimum of
  2880. new software technology    beyond XMODEM/CRC.  ZMODEM can be implemented on
  2881. all but    the most throughly brain damaged microcomputers.
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.